Declare the test matrices in one place - #967
Conversation
Each matrix is emitted whole from load-shared-vars, so the consuming job is a single fromJson line and the pull-request/push split lives in one if. Emitting an object rather than two lists also allows include, which a cross product cannot express.
|
Warning Review limit reached
Next review available in: 27 minutes Limit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
The test matrices are now declared once, in
.github/actions/load-shared-vars/action.yml, and nowhere else. Changing what CI runs is an edit to that one file; no workflow job gains a condition of its own.Two changes make that possible.
Each matrix is emitted as a whole matrix object rather than two lists. The consuming job becomes one line:
That is less than it replaced (two
fromJsonlines plus their comments), and it allowsinclude, which a cross product of an OS list and a Python list cannot express.The pull-request/push split lives in a single
ifin that same file. Everything a maintainer would want to change sits above a marked line; below it is assembly only.What runs where
dev/mastertest_codetest_code_min_depsnetwork_testssetup,conda_envEvery Python version and every OS is still exercised on a pull request; only the redundant cross product is dropped. The full grid still runs, on the push to
devthat follows the merge — and since #965 a newer push supersedes it rather than stacking.Measured against medians from the last 25 runs, a pull request drops from ~28 jobs / ~145 min of runner time to ~15 jobs / ~72 min. The org is capped at 20 concurrent jobs, so this is roughly the difference between one pull request saturating CI and three sharing it.
Restoring the old behavior is a one-line edit: set
pr_test_matrixto{"os":'"$all_os"',"python-version":'"$full_py"'}, and likewise for the other two.Verification
The script was executed directly with
GITHUB_EVENT_NAMEset both ways and the emitted JSON expanded into job lists; the counts above are that output, not an estimate.Changelog
none
Checklist
I have:
docs/contributing/general_guidelines.qmd).