Repository navigation
ci: run a trimmed Python test matrix on pull requests - #509
Merged
Merged
Conversation
The free plan's 20 concurrent jobs are always full, and the Python test matrix alone takes 11 of them on every pull request, 5 on Windows. Pull requests now run Linux on every Python, Windows on 3.11 and 3.15, and macOS on 3.15: 7 cells. Pushes to main and dev and manual runs still run the full 11, so a failure that shows only on Windows 3.12 to 3.14 or on macOS 3.11 appears in the push run right after the merge. One `include:` expression in the test job picks the set by event. test_ci_workflows.py pins both sets: the full set must cover every supported Python on Windows and Linux (except the one the Check workflow runs) and macOS at both ends, and the pull-request set must be the stated subset. scripts/supported_versions.py reads the versions from the full set, and docs/codebase.md describes both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Part of #405, a follow-up Juro approved.
Change
py--tests.yml'stestjob now picks its cells by event, in oneinclude:expression:mainordev, manual runLinux 3.14 stays out of both, because the Check workflow runs the same suite there on every pull request (#489).
Saving
The saving per PR is 4 jobs and their runner slots: Windows 3.12, 3.13 and 3.14, and macOS 3.11. By the completed-run medians in the #405 proposal, that is about 24 + 27 + 26.5 + 20 ≈ 97 job-minutes. Windows drops from 5 of the free plan's 20 concurrent slots per PR to 2.
Risk
A failure that shows only on Windows 3.12 to 3.14, or only on macOS 3.11, no longer shows on the pull request. It shows in the push run on
mainright after the merge. Python tests has a path filter on push, the same as on pull requests, so every change that ran the trimmed set also runs the full set once merged.Required checks
The main ruleset ("Require checks for main") requires only
check. No cell of this matrix is required, so no required check disappears on pull requests.Guards and docs
test_ci_workflows.pyreads both sets out of the expression and pins them:So a later edit that drops main's coverage fails the test.
scripts/supported_versions.py, which the weekly supported-versions workflow runs, reads the Python versions from the full set, and itsgenerateoutput describes both sets.docs/codebase.mddescribes both sets and the one place that picks them.Evidence
test_ci_workflows.pyandtest_repo_check_script.pypass (16).scripts/validate.pypasses.supported_versions.matrix_versions()returns 3.11 to 3.15 from the new matrix.testcells.🤖 Generated with Claude Code