Skip to content

ci: test only what a pull request can break: its packages, their dependents, and the site when it imports them - #1056

Merged
alowpoly merged 2 commits into
mainfrom
ci/tools-when-touched
Sep 30, 2026
Merged

alowpoly merged 2 commits into
mainfrom
ci/tools-when-touched

Conversation

@alowpoly

@alowpoly alowpoly commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

A pull request now tests only what it can break. .github/scripts/ci/affected-tests.mts reads 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 root tsconfig, a workflow), tests everything.

So a pull request that only changes object data runs no package tests, and one that only touches telescope-cli runs only its tests. The limb tests of the offline tools (disc fits, limb refinement, limb laws; nine files) are deleted; the shared law keeps photometry/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 fits and spice alone (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.

@alowpoly alowpoly changed the title ci: test the preparation and archive tools only in pull requests that touch them ci: test only what a pull request can break: its packages, their dependents, and the site when it imports them Sep 30, 2026
@alowpoly
alowpoly merged commit 85e6ecd into main Sep 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant