From 0af53a54e67232877271bc8525933d629ad950c5 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 16 Nov 2026 19:42:33 +0100 Subject: [PATCH] CI: prepare for merge queue * Run CI on `merge_group` events so required checks report on merge-queue commits. * Restrict `push` runs to `main`. Previously, pushes to in-repo PR branches ran CI twice (`push` and `pull_request`), and the merge queue's temporary `gh-readonly-queue/*` branches would also have triggered `push` runs. Branches without a pull request no longer get CI on push; use `workflow_dispatch` there if needed. * Add a `doc` job building the documentation in the merge queue, since Read the Docs does not build merge groups. Read the Docs keeps covering pull requests, so the job is skipped there; skipped jobs count as passing for required checks. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci_tests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index a140c3ab..1da3a9c0 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -2,7 +2,10 @@ name: CI on: push: + branches: + - main pull_request: + merge_group: workflow_dispatch: schedule: - cron: '48 4 * * *' @@ -44,3 +47,26 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.14' + + doc: + # Read the Docs covers PRs. Skipped jobs count as passing, so this can + # be a required check. + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v7 + + - name: Install uv and python + uses: astral-sh/setup-uv@v10.0.1 + with: + enable-cache: true + python-version: "3.12" + + - name: Build documentation + run: | + uv sync --no-default-groups --group doc + uv run --no-sync make -C doc html