Repository navigation
Run lint and compile once and share one dependency cache - #1495
Merged
Merged
Conversation
This was referenced Oct 10, 2026
cristianrgreco
added this pull request to stack #1498
October 10, 2026 20:35
cristianrgreco
commented
Oct 11, 2026
Replace the per-module lint matrix with one job that runs Biome over the whole repository.
Replace the per-module compile matrix with one job that runs `npm run check-compiles`, a project-references build of every package. npm-setup installs every workspace when it isn't given one.
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/lint-whole-repo
branch
from
October 11, 2026 18:15
90f0ac2 to
ad7c93b
Compare
cristianrgreco
added this pull request to stack #1501
October 11, 2026 18:15
cristianrgreco
removed this pull request from stack #1501
October 11, 2026 18:26
There is only one kind of install now, so the key no longer needs a segment to tell them apart.
Use the built-in runner context instead of a `runner` input, so callers only pass the Node version.
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
Three changes to the
Checksworkflow, one commit each:Lintjob for the whole repository, replacing the per-module matrix.lint:ciis nowbiome ci --error-on-warnings ..Compilejob for the whole repository, replacing the per-module matrix. It runsnpm run check-compiles(tsc -b packages/testcontainers packages/modules/*).npm-setupalways runsnpm cifor every workspace, with one cache key per runner OS and architecture, Node version and lockfile (npm-v3-<os>-<arch>-node-<version>-<lockfile hash>). Its only input is nownode-version: theworkspaceandrunnerinputs and theworkspace_pathoutput are gone, andtest-template.ymlworks out the path of the package under test itself.After this, every job that installs dependencies (Lint, Compile, the smoke tests and the test jobs) restores the same cache.
Linthas noif, so it runs on every change the workflow covers.Compileis still skipped when no package changed. Smoke tests and tests are still gated by which packages changed.Why
Lint and Compile. Biome checks all 456 files in about a second, and a clean whole-repository build takes about 1.7s locally. On a recent all-green run of
Checks:Nearly all of that was runner start-up and per-module installs, and every Compile job rebuilt
testcontainersbefore checking its own module.Cache.
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 that same run, the install step in the 176 test jobs took 7s at the median and up to 32s.What doesn't change
Compilechecks the same 44 projects as before, test files included, each from itstsconfig.json. It doesn't catch more than before either: no module depends on another module, and a change totestcontainersor a shared file already recompiled every package.noFloatingPromisesis type-aware, so I checked whether it needs each module's dependencies installed. It doesn't: with a probe file in a module, Biome reports an unawaited localasyncfunction and an unawaitedGenericContainer.start(), and doesn't report an unawaitedpgornode:timers/promisescall. The result is the same withpg,@types/pgor@types/noderemoved fromnode_modules.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
npm run lint:ci: passes on the whole repository. With a file containing an unawaited local promise added under a module, it exits 1.npm run check-compilesfrom a clean state: passes. With a test file containing a type error added under a module, it exits 2 and reportsTS2322for that file.action.yml,checks.ymlandtest-template.ymlparse.npm run format: no fixes applied.Checksin full:Lint, the singleCompilejob, the three smoke-test jobs and all 176 test jobs, using the shared cache and the new test-path expression.Why this isn't breaking
CI-only. No package source, dependency or published file changes.
The check names change from
Lint (<module>)andCompile (<module>)toLintandCompile.mainhas no branch protection or required status checks, so nothing needs updating.