Skip to content

CI

CI #1204

Workflow file for this run

name: CI
on:
push:
branches:
- 'main'
pull_request:
merge_group:
types: [checks_requested]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# Build the test and lint matrices dynamically from `tox -l` so adding a
# new tox env automatically extends CI without editing workflow YAML.
prepare:
name: prepare-matrix
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
test_matrix: ${{ steps.gen.outputs.test_matrix }}
lint_matrix: ${{ steps.gen.outputs.lint_matrix }}
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Python 3.14
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.14"
- name: Set up uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Generate matrix JSON from tox -l
id: gen
run: |
uvx --with tox-uv tox -l | python scripts/tox_matrix.py >> "$GITHUB_OUTPUT"
misc:
uses: ./.github/workflows/misc.yml
lint:
needs: prepare
uses: ./.github/workflows/lint.yml
with:
matrix: ${{ needs.prepare.outputs.lint_matrix }}
tests:
needs: prepare
uses: ./.github/workflows/test.yml
with:
matrix: ${{ needs.prepare.outputs.test_matrix }}
check:
if: always()
needs:
- prepare
- misc
- lint
- tests
runs-on: ubuntu-latest
steps:
- if: |
needs.prepare.result != 'success' ||
needs.misc.result != 'success' ||
needs.lint.result != 'success' ||
needs.tests.result != 'success'
run: exit 1 # fail