[pre-commit.ci] pre-commit autoupdate #1400
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: | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test ${{ matrix.py }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| py: | |
| - "3.13" | |
| - "3.12" | |
| - "3.11" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.py }} | |
| - uses: dtolnay/rust-toolchain@1.79.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: uv sync --extra test --locked | |
| - run: uv run pytest --benchmark-disable -vvv --durations=10 | |
| mypy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - uses: dtolnay/rust-toolchain@1.79.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: uv sync --extra test --locked | |
| - run: make mypy | |
| - run: make stubtest | |
| benchmark: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| # Run on codspeed for walltime and ubuntu for instrumenentation | |
| runner: [ ubuntu-latest, codspeed-macro ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| # Work around import-time SciPy/sklearn segfaults on the codspeed ARM64 Python 3.13 runner. | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.12" | |
| - uses: dtolnay/rust-toolchain@1.79.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: | | |
| export UV_PROJECT_ENVIRONMENT="${pythonLocation}" | |
| uv sync --extra test --locked --python 3.12 | |
| - uses: CodSpeedHQ/action@v4.11.1 | |
| with: | |
| token: ${{ secrets.CODSPEED_TOKEN }} | |
| # allow updating snapshots due to indeterministic benchmarks | |
| run: pytest -vvv --snapshot-update --durations=10 --codspeed-max-rounds=10 python/tests/test_array_api.py -k "test_jit or test_run_lda" | |
| mode: ${{ matrix.runner == 'ubuntu-latest' && 'instrumentation' || 'walltime' }} | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - uses: dtolnay/rust-toolchain@1.79.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install graphviz | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz | |
| - run: uv sync --extra docs --locked | |
| - run: make docs |