Migrate from Poetry to UV and bring project up to speed with 2026 standards #842
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: Linters | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| analyse: | |
| name: "Python ${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "${{ matrix.python-version }}" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Cache venv | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| key: venv-${{ hashFiles('**/uv.lock') }} | |
| - name: Cache prek | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/prek/ | |
| key: ${{ runner.os }}-prek-${{ hashFiles('**/uv.lock') }}-${{ hashFiles('**/.pre-commit-config.yaml') }} # yamllint disable-line | |
| - name: Install dependencies | |
| run: uv sync --all-groups | |
| - name: Register problems matchers | |
| run: | | |
| echo "::add-matcher::.github/workflows/matchers/mypy.json" | |
| echo "::add-matcher::.github/workflows/matchers/python.json" | |
| - name: Run prek (pre-commit checks) | |
| env: | |
| SKIP: ${{ github.ref == 'refs/heads/main' && 'no-commit-to-branch' || '' }} | |
| run: uv run prek run --show-diff-on-failure --color=always --all-files |