Repository navigation
ci: run only the jobs of the packages a change touched - #54
Merged
Merged
Conversation
A `changes` job classifies the files of a pull request, and each package's job runs only when that package changed: the engine, a shared root file, a push to main or a release PR run everything, since every destination depends on the engine. A skipped job reports as success to the branch rules, so the required checks keep their names. The Docker matrix entries all run and skip their steps instead, since a job-level condition cannot read the matrix and each image's check is required. Lint no longer builds and typechecks the whole workspace; typecheck moves into each package's job, after its build. The pre-push hook runs only the packages changed since the branch left its upstream, plus their dependents, through pnpm's `...[ref]` filter.
[Medium impact] The PR appears safe to merge; the database startup change addresses the remaining finding. SummaryThis PR limits builds and checks to changed packages and the packages that depend on them.
No new actionable issues were found in the changes since the previous review. Reviews (3) · Last reviewed commit: "ci: start Postgres and MySQL in gated st..." · Reviewed by Greptile |
…check the example A job skipped by a job-level condition is skipped before its matrix expands, so the checks the branch rules require by name would never be reported and a destination-only PR would wait on them forever. Every job now runs and skips its steps instead, as the Docker workflow does. The hook's build selection takes dependencies in as well as dependents: a destination compiles against the engine's built output, which a fresh checkout lacks. The Postgres job typechecks the example package, which Lint used to cover for the whole workspace.
…e root pnpm's own change detection counts the workspace root as a changed project when a hook or workflow file changes, and the root's build recurses into every package. The hook now reads the changed package directories from the diff and selects them with pnpm's directory selectors; a change outside any package runs nothing unless it is a shared root file, which runs everything.
A service container starts before the gate, so a PR that did not touch the package still booted a database for every Node version before skipping every step. Both databases now start in a step behind the same condition as the rest, the way the ClickHouse job already does.
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.
Summary
changesjob classifies the pull request's files withdorny/paths-filter; a destination's job runs when its package changed, and every job runs when the engine changed (every destination depends on it), when a shared file changed (the lockfile, the workspace file, a root config, the workflow itself), on a push tomain, or on a release PR (release-please--*). A job whose condition is false reports as skipped, which the branch rules accept as success, so the required checks keep their names.main), plus the packages that depend on them, through pnpm's...[ref]filter. A change to a shared root file runs everything, as CI does.Testing
actionlintpasses on the three workflows. This PR changes the CI workflow itself, which counts as shared, so every job runs here; the first package-only PR after it merges is where the skips show.