[pre-commit.ci] pre-commit autoupdate #1804
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: main | |
# Automatically cancel a previous run. | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
run-type-checking: | |
name: Run tests for type-checking | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v6 | |
with: | |
enable-cache: true | |
- run: uv run --no-dev --group typing mypy | |
- run: uv run --no-dev --group typing nbqa mypy --ignore-missing-imports . | |
run-tests: | |
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
- if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz graphviz-dev | |
- name: Run tests, doctests, and notebook tests | |
shell: bash -l {0} | |
run: uv run --group test pytest --nbmake --cov=src --cov=tests --cov-report=xml -n auto | |
- name: Upload test coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@v5 | |
- name: Run tests with lowest resolution | |
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' | |
run: uv run --group test --resolution lowest-direct pytest --nbmake -n auto | |
- name: Run tests with highest resolution | |
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' | |
run: uv run --group test --resolution highest pytest --nbmake -n auto |