ci: bump GitHub Actions off deprecated Node 20 runtime #37
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test (${{ matrix.os }}, py${{ matrix.python }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 # the suite runs in ~2 min; fail fast instead of hanging 6 h | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # PySide6 (the GUI tests, run offscreen) needs the EGL/OpenGL system | |
| # libraries, which the ubuntu-latest image no longer preinstalls. | |
| - name: Install Qt system libraries (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0 libgl1 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Create environment | |
| run: uv venv --python ${{ matrix.python }} | |
| - name: Install | |
| run: uv pip install -e ".[dev]" | |
| - name: Test (GPU tests auto-skip without a device) | |
| run: uv run pytest -q | |
| lint: | |
| name: lint + types | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Create environment | |
| run: uv venv --python 3.12 | |
| - name: Install | |
| run: uv pip install -e ".[dev]" | |
| - name: Ruff | |
| run: uv run ruff check src tests | |
| - name: Mypy | |
| run: uv run mypy | |
| docs: | |
| name: docs build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Create environment | |
| run: uv venv --python 3.12 | |
| - name: Install | |
| run: uv pip install -e ".[docs]" | |
| # -W turns broken cross-references / malformed docstrings into build failures. | |
| - name: Build (warnings are errors) | |
| run: uv run sphinx-build -b html -W --keep-going docs docs/_build/html |