chore(deps): update pre-commit hooks #607
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: | |
| workflow_dispatch: | |
| schedule: | |
| # Daily at 12:00 UTC | |
| - cron: "0 12 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_COLOR: 1 | |
| jobs: | |
| build-package: | |
| name: Build & verify package | |
| runs-on: ubuntu-latest | |
| outputs: | |
| supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0 | |
| id: baipp | |
| actionlint: | |
| name: Static analysis of GitHub Actions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: reviewdog/action-actionlint@0d952c597ef8459f634d7145b0b044a9699e5e43 # v1.71.0 | |
| lint: | |
| name: Static analysis of code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | |
| - name: Install tox | |
| run: uv tool install --with tox-uv tox | |
| - name: Type checks | |
| run: tox -e typing | |
| - name: Lint code | |
| run: tox -e lint | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| needs: build-package | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04] | |
| python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | |
| - name: Run tests | |
| env: | |
| PYTHON: ${{ matrix.python-version }} | |
| run: uvx --with tox-uv tox -e "$PYTHON" | |
| - name: Upload coverage data | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| include-hidden-files: true | |
| name: coverage-data-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: ".coverage.*" | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| pattern: coverage-data-* | |
| merge-multiple: true | |
| - uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | |
| - name: Combine coverage data and generate report | |
| run: uvx --with tox-uv tox -e coverage |