diff --git a/.github/workflows/ci-lint.yaml b/.github/workflows/ci-lint.yaml new file mode 100644 index 0000000..ac77af1 --- /dev/null +++ b/.github/workflows/ci-lint.yaml @@ -0,0 +1,39 @@ +name: CI - Lint + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + PYTHONUNBUFFERED: "1" + FORCE_COLOR: "1" + +jobs: + lint: + name: Lint Code + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Set up Python + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: '3.12' + + - name: Install Ruff + run: | + python -m pip install --upgrade pip + pip install ruff==0.12.8 + + - name: Run linting + run: ruff check . + + - name: Check formatting + run: ruff format --check .