Upgrade linting dependencies & switch to ruff #94
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: "Lint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: "actions/setup-python@v3" | |
| with: | |
| python-version: "3.10" | |
| - name: "Install dependencies" | |
| run: python -m pip install ruff==0.11.9 mypy==1.15.0 | |
| - name: "Run ruff" | |
| run: ruff check | |
| - name: "Run ruff format" | |
| run: ruff format | |
| - name: "Run mypy" | |
| run: mypy | |
| tests: | |
| name: "Python ${{ matrix.python-version }}" | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: "actions/setup-python@v2" | |
| with: | |
| python-version: "${{ matrix.python-version }}" | |
| - name: "Install dependencies" | |
| run: | | |
| set -xe | |
| python -VV | |
| python -m site | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install --upgrade tox | |
| - name: "Run tox targets for ${{ matrix.python-version }}" | |
| env: | |
| TOX_SKIP_ENV: ".*djangomain.*" | |
| run: "python -m tox" | |
| - name: "Run tox targets for ${{ matrix.python-version }} for django main" | |
| env: | |
| TOX_SKIP_ENV: ".*django[^m].*" | |
| run: "python -m tox" | |
| continue-on-error: true |