Repository navigation
Share one dependency cache across CI jobs - #1497
Closed
cristianrgreco wants to merge 1 commit into
Closed
cristianrgreco wants to merge 1 commit into
cristianrgreco wants to merge 1 commit into
Conversation
cristianrgreco
added this pull request to stack #1498
October 10, 2026 20:35
Make npm-setup always install every workspace, so every job restores the same cache per Node version instead of one per package. The test jobs resolve the path of the package under test themselves.
cristianrgreco
removed this pull request from stack #1498
October 11, 2026 18:15
cristianrgreco
force-pushed
the
claude/compile-whole-repo
branch
from
October 11, 2026 18:15
26288f4 to
a93d924
Compare
cristianrgreco
force-pushed
the
claude/share-dependency-cache
branch
from
October 11, 2026 18:15
890d4c3 to
534d2ed
Compare
cristianrgreco
added this pull request to stack #1501
October 11, 2026 18:15
This was referenced Oct 11, 2026
cristianrgreco
removed this pull request from stack #1501
October 11, 2026 18:26
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.
Folded into #1495.
Stacked on #1496, which is stacked on #1495. Review and merge those first.
Summary
Every job that installs dependencies now restores one shared cache per Node version, instead of one cache per package.
npm-setuploses itsworkspaceinput andworkspace_pathoutput. It always runsnpm cifor every workspace, with one cache key per runner, Node version and lockfile.test-template.ymlworks out the path of the package under test itself.Why
The repository is over GitHub's 10 GB Actions cache limit (10.8 GB), so caches are being evicted and jobs fall back to
npm ci. On a recent all-green run, the install step in the 176 test jobs took 7s at the median and up to 32s.Trade-offs
noUndeclaredDependenciesrule now reports undeclared imports statically.npm prune --omit=dev --workspace packages/testcontainersremoves the same 11 packages after either install (336 to 325 with atestcontainers-only install, 1126 to 1115 with a full one). The one case that's weaker: a packagetestcontainersneeds at runtime but lists only as a dev dependency now goes unnoticed if any module also depends on it, where before only the root counted. The step never gave a production-only environment: vitest, TypeScript and Biome stay installed after it either way.npm ci(35s on CI) until one saves the cache. Today every job also misses on a lockfile change, since each per-package key includes the lockfile hash.Verification
action.yml,checks.ymlandtest-template.ymlparse.npm run format: no fixes applied.Checksruns on this PR as part of the stack. An earlier revision of this change passed it in full: all 176 test jobs (which use the newTEST_PATHexpression and the shared cache), the three smoke-test jobs,LintandCompile.Why this isn't breaking
CI-only. No package source, dependency or published file changes.