Reduce CI footprint: skeleton on branch pushes, full suite on PRs, ci-<token> opt-in - #408
Merged
Merged
Conversation
Pushes to any branch (in this repo or on forks) run a skeleton: installs, linting, domainless tests, the docs build, and example notebooks on ubuntu only. The full suite (7 domain test jobs x 3 platforms) runs for pull requests including drafts, pushes to develop/main, and workflow_dispatch. Concurrency groups cancel in-flight runs superseded by a newer push on the same ref, except on develop/main where every run completes. One full CI trigger is ~30 jobs / ~660 runner-minutes vs ~55 for the skeleton. Public-repo standard-runner minutes are free, but runner concurrency slots are shared across the organization; this keeps per-push feedback on forks while reserving the big matrix for PRs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Domain test jobs also run on branch pushes when a ci-<token> appears in the branch name or the pushed head commit message: ci-all, ci-sagehen, ci-hru1, ci-drb, ci-ucb, ci-fgr. A branch named my_feature_ci-fgr runs both fgr jobs on every push with nothing to clean up before merge, since the opt-in lives in the branch name. Documented in DEVELOPER.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Branch-name tokens apply to every push; commit-message tokens are evaluated fresh per push (head commit only) with no memory of earlier pushes. Add the empty-commit recipe for triggering a domain run without code changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tokens are matched by plain substring test: they only add jobs, suffixes do not narrow selection, and messages mentioning a literal token trigger it. Maintainer notes: new domain jobs must carry the if: gate, and finer tokens must be mutually non-substring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DEVELOPER.md: tokens are matched by plain substring test - they only add jobs, suffixes do not narrow selection, and a message mentioning a literal token triggers it; sticky (branch name) vs one-shot (head commit message) variants; empty-commit recipe. Maintainer notes: new domain jobs must carry the if: gate, finer tokens must be mutually non-substring. CLAUDE.md: gate-copying rule, especially when merging develop into branches that predate the gates. Workflow comments point to DEVELOPER.md under "CI". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Captures the CI triage procedure: stale-run vs real-failure verdict via timestamps, public-API annotations when logs are admin-locked, known failure signatures, and local reproduction parity steps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce CI footprint: skeleton on branch pushes, full suite on PRs, ci- opt-in
Summary
Reduces the Actions footprint of this repo (flagged as a large share of
organization resource usage) while keeping per-push CI feedback on branches
here and on forks, for maintainers and contributors. Changes to ci.yaml,
ci_examples.yaml, and ci_docs.yaml:
Skeleton/full split. Pushes to any branch run a skeleton: installs,
linting, domainless tests (3 platforms), the docs build, and example
notebooks on ubuntu only (~55 runner-minutes). The full suite (7 domain
test jobs × 3 platforms, ~660 runner-minutes) runs for pull requests
(including drafts), pushes to develop/main, and workflow_dispatch.
ci- opt-in for domain jobs on branch pushes. A token
(ci-all, ci-sagehen, ci-hru1, ci-drb, ci-ucb, ci-fgr) in the
branch name is sticky (every push, nothing to clean up before merge —
the opt-in lives in the branch name); in the head commit message it is a
one-shot for that push. Documented in DEVELOPER.md under "CI", including
the empty-commit recipe for triggering a run without code changes.
Concurrency cancellation. A newer push to the same ref cancels the
superseded in-flight run; runs on develop/main always complete.
Context
Standard-runner minutes in a public repo are free and do not draw on the
organization's metered quota, but runner concurrency slots are shared
org-wide. Cancelling superseded runs and trimming plain branch pushes to a
skeleton addresses the shared-resource footprint without losing coverage
where it matters.
Verification (on fork)
Plain branch push → skeleton only, all domain jobs skipped.
Commit message containing tokens → domain jobs ran (inadvertently
demonstrated by a commit message that listed every token — note that the
match is a plain substring test, so messages that mention tokens
trigger them).
Superseded push → in-flight run cancelled, new run started.
This PR runs the full suite.
Note for in-flight PRs
Domain jobs added on other branches (e.g. the sagehen jobs in #407) will
not have the gate after merging develop in, and ungated jobs run on every
push. New domain jobs should copy the if: gate from an existing domain
job, with an appropriate token.
Checklist
[x] User visible changes are documented in whats-new.rst (:pull: number
to be corrected to this PR's number)