Update pre-commit #202
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: | |
| pull_request: | |
| paths: | |
| - '**.py' | |
| - '.github/workflows/*.yml' | |
| - '.pre-commit-config.yaml' | |
| - 'pyproject.toml' | |
| - 'tox.ini' | |
| - 'mypy.ini' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| pre-commit: | |
| name: Generic pre-commit checks | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: SKIP=mypy uvx prek run --all-files | |
| mypy: | |
| name: Mypy | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uvx prek run mypy --all-files | |
| tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] | |
| python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| name: Tests on ${{ matrix.python }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - run: pip install tox tox-gh-actions | |
| - run: python -m tox | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7.0.0 | |
| with: | |
| name: codecov-${{ matrix.python }} | |
| token: ${{ secrets.CODECOV_TOKEN }} |