CL-6589: make CI itself fast — cache installs and lint, check only what changed - #299
Merged
Conversation
The affected-package filter and the lint caches from CL-6589 only ever helped a local run. CI checks out fresh, never set WORKBENCH_CHECK_SINCE, and threw both caches away every time, so every PR paid for all 110 packages and a cold 108-second eslint. - fetch-depth: 0 so the filter can resolve a merge base. - WORKBENCH_CHECK_SINCE is the PR's base commit for typecheck and test. A push to main leaves it unset and still checks everything, so main is never validated by a subset. - Bun's install cache is keyed on the lockfile; the eslint and prettier caches restore from the most recent run. A pull request now typechecks and tests the packages it can actually break instead of the whole workspace.
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.
Follow-up to CL-6589. The speedups landed there only ever helped a local run: CI checks out fresh, never set
WORKBENCH_CHECK_SINCE, and discarded both lint caches every time. So every PR still paid for all 110 packages and a cold ~108s eslint. That was my miss — I optimized the wrong half.Changes
fetch-depth: 0on every job so the affected-package filter can resolve a merge base.WORKBENCH_CHECK_SINCE: ${{ github.event.pull_request.base.sha }}on typecheck and test. A PR now checks the packages it can actually break plus their transitive dependents.bun.lock.Why main is still fully checked
The env var resolves to empty on a
push: mainevent, and the runner treats unset as "run everything." main is never validated by a subset — only PRs are narrowed. That matters: the filter is a speed optimization on the way in, not a weakening of the branch everything merges into.Expected effect
Measured locally, the filter takes a leaf-package change from 109 packages to 6, and warm lint from ~127s to ~4.3s. A PR touching one package should now be dominated by install + runner startup rather than by work it didn't cause.
Correctness guardrails are unchanged and were already tested in CL-6589: a change to a root manifest,
bun.lock, the shared tsconfig, the eslint config,scripts/, or.github/forces a full run, and dependents are walked to a fixed point so a cycle terminates. This PR touches.github/, so it will run the full gate on itself — which is the correct self-demonstration.