# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
---
name: Ruff

on: [push, pull_request]

jobs:
  ruff-format:
    name: Run Ruff format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Execute Ruff format
        uses: astral-sh/ruff-action@v3
        with:
          version: 0.11.0
          args: format --check

  ruff-check:
    name: Run Ruff check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Execute Ruff check
        uses: astral-sh/ruff-action@v3
        with:
          version: 0.11.8
          args: check
