Repository navigation
CI: run the full matrix only when a pull request needs it - #641
Merged
Merged
Conversation
Every push to a pull request ran all 15 jobs (~48 runner-minutes, ~21 minutes, the macOS tests alone ~16), whatever the push changed. - A new job "Detect changes" reads the files a pull request changes. Documentation, examples and Markdown only: code-quality checks only. Python code: code-quality checks and the Ubuntu jobs (stable tests, games, benchmark). The build, the dependencies, the C++ extensions or the CI workflows: also the matrix (Windows, macOS, Python 3.14/3.15). Pushes to main and manual runs always run everything. - The label "full ci" runs the matrix on a pull request: adding it starts a run (ci_full.yml), and while it is on, every push runs the matrix. - The coverage job ran the same tests as the stable job on the same Python: the stable job now measures and uploads the coverage. - The install-and-import check runs on Ubuntu only: the test matrix installs shapiq on the other platforms. - Every job gets a timeout instead of the default six hours. - A job "CI result" fails if any job failed or was cancelled, and a skipped job counts as passed: require it in branch protection. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MhQWPdeTbJyESb8uBYqLAU
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- "Detect changes" diffs without rename detection: a file moved from src/ to docs/ or examples/ listed only its new path, so the pull request counted as documentation only and skipped the tests. - Pushes to main no longer cancel the run of the previous commit. Main is where pure-Python changes first meet Windows, macOS and the newer Pythons, and a cancelled run left its commit untested and with a failed "CI result". Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MhQWPdeTbJyESb8uBYqLAU
5 of 7 tasks
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.
Motivation and Context
Every push to a pull request ran all 15 CI jobs, no matter what changed: about 48 runner-minutes and 21 minutes of waiting, with the macOS tests alone taking about 16 minutes (example run on a docs-only PR). With coding agents pushing often, this fills the runner queue: the last 100 CI runs came within 11 days, one PR ran CI 14 times, and three docs-only PRs ran the full suite 7 times between them.
What a pull request now runs:
docs/,examples/, Markdown,.claude/, issue templates, RTD configsetup.py,pyproject.toml,uv.lock,MANIFEST.in,build_tools/, C++ extensions (/cext/), the CI workflowsfull ciPushes to
mainand manual runs from the Actions tab still run everything.Changes in
.github/workflows/ci.yml:src/still runs the tests.timeout-minutes(the default was 6 hours).mainno longer cancel each other. Every commit onmaingets its own full run, sincemainis now where pure-Python changes first run on Windows, macOS and the newer Pythons.New
.github/workflows/ci_full.yml: adding the labelfull cistarts a full run right away. While the label is on, every later push runs the full CI too. It is a separate workflow on purpose: ifci.ymlitself listened tolabeled, adding any other label would start a run whose skipped jobs would replace the results of the last run on the same commit.Branch protection: some job names changed ("Run Test Coverage" is gone; the install check and the stable tests were renamed). If any of the old names are required checks, require "CI result" instead.
Trade-off: a full run now waits about 3.5 minutes longer before the matrix starts, because the stable job also measures coverage. A Windows- or macOS-only break in pure-Python code would show up on
mainafter merge rather than on the PR.Public API Changes
How Has This Been Tested?
actionlint(with shellcheck) andpre-commitpass on both workflow files.main. 12 would have run only the code-quality checks (every "Docs:" commit and the README/CHANGELOG edits), 21 the Ubuntu jobs, and 16 the full matrix (C++ extensions,pyproject.toml/uv.lock, workflows). I also checked the push, manual-run, label and empty-diff cases, and a file moved fromsrc/todocs/.ci.yml, the second because of the label.Checklist
CHANGELOG.md(if relevant for users).🤖 Generated with Claude Code
https://claude.ai/code/session_01MhQWPdeTbJyESb8uBYqLAU