…d gate on PRs that pass (#1313)
Give actions/setup-node a cache: npm key at both call sites so the npm cache
directory is restored across runs instead of every job pulling the whole
dependency tree from the registry, and raise the job budget to 10 minutes so a
cold install finishes rather than being killed mid-install.
package-lock.json is gitignored in this repo, so cache-dependency-path names
package.json: without it setup-node fails looking for a lock file, and npm ci is
unavailable for the same reason.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Feature or issue
CI jobs are killed by the 5-minute
timeout-minuteswhilenpm iis still running, so a PR whose code is fine reports a redCI requiredgate andnpm testnever runs. On run33815447042(PR #1312, two markdown files underllp/) all four matrix jobs died inRun npm iafter 5:06, and a re-run 23 minutes later killed #1310typecheck (22)and #1312typecheck (22),test (22),test (24)the same way. The same suite onmasterfinishes in 99-112s across the last twelve runs, so the suite is nowhere near the ceiling: only the install is slow, and only when several jobs install concurrently.actions/setup-node@v4had nocache:key at either call site in.github/workflows/ci.yml, so each of the four matrix jobs per PR pulled the whole dependency tree from the registry cold.Solution
actions/setup-node@v4cache: npmat both call sites in.github/workflows/ci.yml, so the npm cache directory is restored across runs instead of every job refetching the tree from the registry, and raisetimeout-minutesfrom 5 to 10 on both jobs so a cold install finishes rather than being killed mid-install.package-lock.jsonis gitignored in this repo, contrary to the issue's reading, so the cache key is hashed frompackage.jsonviacache-dependency-path: without it setup-node fails looking for a lock file, andnpm ciis unavailable for the same reason.npm test(5992 pass, 0 fail) andnpm run typecheck(clean). Verified on this PR's own CI: the first run reportednpm cache is not foundand savednode-cache-Linux-x64-npm-35e79a4d...; a re-run gotCache restored from keyon all four jobs and every check went green. Install wall time is 92-117s either way on an uncontended runner, so the cache does not shorten an install that was never contended; what it removes is the registry download, which is the part that stalls when a dozen jobs install at once, and the 10-minute budget leaves 5x headroom over a warm install instead of 2.5x. A cache saved on a PR branch is scoped to that PR, so the fleet-wide effect starts once the firstmasterpush run seeds one..github/workflows/llp-check.ymlis the only other workflow and installs no dependencies (it runsscripts/llp-numbers.js, which imports only in-repo andnode:modules), so it needs no cache.Code: +0 / -0 lines
Fixes #1313