Cache Node and the uv binary in CI #420
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci-cache-node"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A cache hit means CI downloads neither Node nor uv.
actions/cachekeeps${{ runner.tool_cache }}/nodeundernode-24-<os>. On a hit,setup-nodefinds Node 24 locally and makes no network call. This is the download that failedfrontend-teston #416.uv-dist-<UV_SHA256>.sha256sum -cstill runs on every job, cached or not, so the fail-closed pin is unchanged. A Renovate bump changes the sha and with it the key.How long an entry lasts. Per the runner's own cache server (
act/artifactcache/caches.goin forgejo/runner): unused for 7 days, deleted; 30 days after creation, always deleted; the same key saved again keeps only the newest. So a new Node 24 patch release arrives within a month without a date in the key. The cache lives on the runner host.Not cached, on purpose.
apt-get install postgresqland Playwright's--with-depscome from the Ubuntu mirrors, and caching apt packages is fragile. npm packages, Playwright browsers, uv packages and pre-commit envs were already cached.To check on the first run. Whether Forgejo fills
runner.tool_cache: the "Cache Node" step logs the path it saves. The first run is a cache miss and still downloads once.setup-node downloaded Node on every run, asking the GitHub API first; the shared runner IP hits its anonymous rate limit and the fallback download failed ("API rate limit exceeded", then a TLS disconnect in frontend-test). The Node tool cache is now kept with actions/cache, keyed per month so a new patch release still arrives, and setup-node finds it without any network call. The uv tarball is cached under its pinned sha256 as the key. The sha256 check still runs on every job, cached or not, so the fail-closed anchor is unchanged.b78fdf273a78bf61d59d78bf61d59d38d44ea35a38d44ea35a8f016ada6a