From 59022f64b888114e6481a6aa17478a0c1c027c42 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Wed, 21 Oct 2026 21:18:05 +0700 Subject: [PATCH] ci: add All green gate job Add an all-green job that needs every other ci.yml job and passes only when all of them succeeded, so the rulesets can require one check from this workflow. Document in AGENTS.md that new jobs join its needs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ AGENTS.md | 10 ++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17dd873..a87a707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,3 +205,25 @@ jobs: node-version: "24" - name: Duplicate code stays under the threshold run: npx --yes jscpd@5.4.1 + + all-green: + # The one check the branch ruleset requires from this workflow, next to + # the separate "API Compatibility" workflow. Add every new job here to + # `needs`. A job skipped because a job it needs failed (Unit Tests after + # Lint & Type Check) fails the gate. No job skips by design today, so + # there is no `allowed-skips`. + name: All green + if: always() + needs: + - secrets-scan + - lint-actions + - lint + - test + - examples-check + - deptry + - duplication + runs-on: ubuntu-latest + steps: + - uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/AGENTS.md b/AGENTS.md index 6e94fe2..5e2f433 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -223,6 +223,16 @@ config's `ignore` list: `introspection_sdk/_sync/` is there because it repeats `introspection_sdk/_async/` by construction (see "Sync code generation"), and counting it would hide every new copy. +## CI + +The `All green` job in `ci.yml` passes only when every other `ci.yml` job +succeeded. The branch rulesets require just two checks: `All green` and +`API Compatibility`, which stays its own workflow (`api-compat.yml`). So a +new `ci.yml` job is not required until you add its id to `needs` of +`all-green`; do that in the same PR. Add it to `allowed-skips` as well only +when the job skips by design (it has an `if:`), never to let a skipped job +through after a failure. + ## When in doubt Read the coverage ratchet in `pyproject.toml`.