Add dark mode logo variant for docs site #1385
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
| # .github/workflows/CI.yml | |
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # CI using uv + just, with minimal/noise-free logs: | |
| # - Colors forced inside a tiny wrapper script (not via step `env:`), so they don’t appear in the log header. | |
| # - No echo/group commands shown. | |
| # - Shared bootstrap steps are DRY via YAML anchors. | |
| name: CI | |
| on: | |
| # https://docs.renovatebot.com/key-concepts/automerge/#if-you-use-github-actions | |
| merge_group: | |
| push: | |
| branches: [main] | |
| tags: | |
| - "*" # matches any tag name | |
| pull_request: | |
| branches: [main] | |
| env: | |
| COLUMNS: 150 | |
| CI: 1 | |
| FORCE_COLOR: 1 | |
| RUFF_OUTPUT_FORMAT: github | |
| RUMDL_OUTPUT_FORMAT: github | |
| JUST_COLOR: always | |
| JUST_COMMAND_COLOR: purple | |
| JUST_EXPLAIN: true | |
| JUST_HIGHLIGHT: true | |
| # Cancel older runs for the same branch/PR (concurrency = run one at a time). | |
| # When you push several commits in a row, only the newest run continues; older ones are cancelled. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # Least-privilege token by default. | |
| permissions: | |
| contents: read | |
| # Consistent shell across OSes; | |
| # Only `run.shell` / `run.working-directory` are supported here. | |
| defaults: | |
| run: | |
| shell: bash --noprofile --norc -euo pipefail {0} | |
| jobs: | |
| lint: | |
| name: Check for formatting and linting violations (via just, uv, prek[pre-commit hooks]) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout (PR) | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Checkout (push) | |
| if: ${{ github.event_name != 'pull_request' }} | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.sha }} | |
| fetch-depth: 1 | |
| - name: Install just | |
| uses: taiki-e/install-action@650c5ca14212efbbf3e580844b04bdccf68dac31 # 2.67.18 | |
| with: | |
| tool: just | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1 | |
| with: | |
| enable-cache: true | |
| cache-python: true | |
| cache-dependency-glob: | | |
| uv.lock | |
| pyproject.toml | |
| .python-version | |
| **/.pre-commit-*.y*ml | |
| - name: Check for formatting and linting violations | |
| run: just lint | |
| env: | |
| PREK_HOME: ${{ env.UV_CACHE_DIR }}/prek | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
| type-check: | |
| name: Type Checking (via just, uv, ty) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install just | |
| uses: taiki-e/install-action@650c5ca14212efbbf3e580844b04bdccf68dac31 # 2.67.18 | |
| with: | |
| tool: just | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1 | |
| with: | |
| enable-cache: false | |
| - name: Type Checking | |
| run: just type-check | |
| test-all: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.13", "3.14"] | |
| resolution-strategy: ["highest", "lowest-direct"] | |
| name: >- | |
| Tests • ${{ matrix.os }} • Python ${{ matrix.python-version }} | |
| • resolution-strategy ${{ matrix.resolution-strategy }} (via just, uv, pytest, pytest-pretty) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install just | |
| uses: taiki-e/install-action@650c5ca14212efbbf3e580844b04bdccf68dac31 # 2.67.18 | |
| with: | |
| tool: just | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1 | |
| with: | |
| enable-cache: true | |
| cache-python: true | |
| cache-local-path: ${{ runner.temp }}/setup-uv-cache | |
| cache-suffix: ${{ matrix.resolution-strategy }} | |
| python-version: ${{ matrix.python-version }} | |
| cache-dependency-glob: | | |
| uv.lock | |
| pyproject.toml | |
| .python-version | |
| - name: Run all the tests | |
| env: | |
| UV_RESOLUTION: ${{ matrix.resolution-strategy }} | |
| run: just test-ci | |
| coverage-xml: | |
| if: > | |
| github.event.pull_request.user.login != 'dependabot[bot]' && | |
| github.event.pull_request.user.login != 'renovate[bot]' && | |
| github.event.pull_request.user.login != 'renovate' && | |
| github.actor != 'dependabot[bot]' && | |
| github.actor != 'renovate[bot]' && | |
| github.actor != 'renovate' | |
| name: Send Coverage to Codecov | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install just | |
| uses: taiki-e/install-action@650c5ca14212efbbf3e580844b04bdccf68dac31 # 2.67.18 | |
| with: | |
| tool: just | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1 | |
| with: | |
| enable-cache: false | |
| - name: Generating an XML Coverage Report | |
| run: just coverage-xml | |
| - name: Upload Coverage Report to Codecov | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| files: coverage.xml | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # https://github.com/marketplace/actions/alls-green#why | |
| all-green: # This job does nothing and is only used for the branch protection | |
| name: All required jobs passed | |
| timeout-minutes: 45 | |
| if: always() | |
| needs: | |
| - lint | |
| - type-check | |
| - test-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |