Docs/update docs #89
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 - Lint and Type Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| workflow-lint: | |
| name: Workflow lint (actionlint) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Lint GitHub workflow files | |
| uses: rhysd/actionlint@v1.7.8 | |
| dependency-audit: | |
| name: Dependency audit (uv audit) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Audit dependencies for vulnerabilities | |
| run: | | |
| uv audit | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Sync dependencies | |
| run: | | |
| uv sync --locked --dev | |
| - name: Lint | |
| run: | | |
| uv run ruff check . | |
| - name: Format | |
| run: | | |
| uv run ruff format --check . | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Sync dependencies | |
| run: | | |
| uv sync --locked --dev | |
| - name: Type check | |
| run: | | |
| uv run ty check . | |
| test: | |
| name: Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| - os: windows-latest | |
| - os: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Sync dependencies | |
| run: | | |
| uv sync --locked --dev | |
| # PySide6 links libEGL even for offscreen; ubuntu-latest images omit it by default. | |
| - name: Install Qt EGL/XCB dependencies (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libegl1 \ | |
| libgl1 \ | |
| libxkbcommon0 \ | |
| libdbus-1-3 | |
| - name: Run pytest | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| run: | | |
| uv run pytest --cov-fail-under=48 | |
| prose-lint: | |
| name: Prose lint (codespell + doc8 + interrogate) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Run pre-commit (prose hooks) | |
| run: | | |
| uv run pre-commit run --all-files codespell | |
| uv run pre-commit run --all-files doc8 | |
| uv run pre-commit run --all-files interrogate | |
| docs: | |
| name: Docs (build + linkcheck) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| # autosummary imports dbs_annotator modules that transitively touch | |
| # PySide6; ubuntu-latest images omit the EGL/XCB libs that PySide6 needs | |
| # even under QT_QPA_PLATFORM=offscreen. | |
| - name: Install Qt EGL/XCB dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libegl1 \ | |
| libgl1 \ | |
| libxkbcommon0 \ | |
| libdbus-1-3 | |
| - name: Sync docs dependency group | |
| run: | | |
| uv sync --locked --group docs --no-dev | |
| - name: Build HTML docs (warnings are errors) | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| MPLBACKEND: Agg | |
| run: | | |
| uv run sphinx-build -b html -W --keep-going docs docs/_build/html | |
| - name: Link check (non-blocking) | |
| continue-on-error: true | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| MPLBACKEND: Agg | |
| run: | | |
| uv run sphinx-build -b linkcheck docs docs/_build/linkcheck | |
| - name: Upload rendered HTML artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html-${{ github.sha }} | |
| path: docs/_build/html | |
| if-no-files-found: error | |
| - name: Upload linkcheck report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-linkcheck-${{ github.sha }} | |
| path: docs/_build/linkcheck | |
| if-no-files-found: warn | |
| package-briefcase-zip: | |
| name: Package Briefcase ZIP (Windows) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Sync dependencies (incl. build / Briefcase) | |
| run: | | |
| uv sync --locked --dev --group build | |
| - name: Briefcase create / build / package (zip) | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| run: | | |
| uv run briefcase create windows app | |
| uv run briefcase build windows app | |
| uv run briefcase package windows -p zip | |
| - name: Upload Briefcase ZIP artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: briefcase-windows-zip-${{ github.sha }} | |
| path: dist/ | |
| if-no-files-found: warn |