ci: test only what a pull request can break: its packages, their dependents, and the site when it imports them - #1056
Merged
Merged
Conversation
… only when it can break
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.
A pull request now tests only what it can break.
.github/scripts/ci/affected-tests.mtsreads the changed paths and the workspace manifests. The packages lane tests the packages the change touched and every package that depends on one; the site lane runs when the site,src/,integration/or.github/changed, or a package the site imports did. A lane with nothing to test still reports, so the required checks pass, but skips its install, build and restore. A push to main, or a change to shared configuration (package.json, the lockfile, a roottsconfig, a workflow), tests everything.So a pull request that only changes object data runs no package tests, and one that only touches
telescope-cliruns only its tests. The limb tests of the offline tools (disc fits, limb refinement, limb laws; nine files) are deleted; the shared law keepsphotometry/limb.test.mts.Proves the change: the new selection test (3 cases); CI script tests (63 pass). Locally, the packages lane's list branch ran
fitsandspicealone (46 tests). In CI the packages lane's test step took 422 s of a 12.4 min run.Limits: a change outside a package that breaks one is found on the push to main. This pull request changes the workflow, so its own run tests everything.
PR rules: titles, PDS4 provenance and ISO plain language.