You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actions/setup-dotnet: adds cache: true and cache-dependency-path: "**/*.fsproj" to all 11 Setup .NET steps. The action caches ~/.nuget/packages and uses a cache key derived from the hash of all .fsproj files, so the cache automatically invalidates when NuGet dependencies change.
actions/setup-node: adds cache: npm to all 5 Setup Node.js environment steps. The action caches the npm download cache (~/.npm) keyed on the root package-lock.json hash.
Expected Benefit
NuGet restore downloads can take 1-3 minutes per job. With ~11 jobs running per PR (some in parallel, some on matrix), caching saves significant CI time on repeat runs where dependencies have not changed — which is the common case.
Notes
The cache: true option in setup-dotnet@v5 is the officially recommended approach and handles both Linux and Windows paths automatically.
The cache: npm option in setup-node@v5 does not skip npm install — it only caches the download cache. The actual install still runs, but is faster when packages are already cached.
No behaviour changes to the tests or build scripts.
Warning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the patch from the workflow run
gh run download 24221005907 -n agent -D /tmp/agent-24221005907
# Create a new branch
git checkout -b repo-assist/eng-ci-nuget-npm-caching-2026-04-de479ba7cc732133 main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24221005907/aw-repo-assist-eng-ci-nuget-npm-caching-2026-04.patch
# Push the branch and create the pull request
git push origin repo-assist/eng-ci-nuget-npm-caching-2026-04-de479ba7cc732133
gh pr create --title '[Repo Assist] [Eng] Add NuGet and npm package caching to CI workflow' --base main --head repo-assist/eng-ci-nuget-npm-caching-2026-04-de479ba7cc732133 --repo fable-compiler/Fable
🤖 This pull request was created by Repo Assist, an automated AI assistant.
Summary
Adds NuGet package caching and npm download-cache caching to every job in the CI workflow, reducing redundant package downloads on every run.
Closes #4486
Changes
actions/setup-dotnet: addscache: trueandcache-dependency-path: "**/*.fsproj"to all 11Setup .NETsteps. The action caches~/.nuget/packagesand uses a cache key derived from the hash of all.fsprojfiles, so the cache automatically invalidates when NuGet dependencies change.actions/setup-node: addscache: npmto all 5Setup Node.js environmentsteps. The action caches the npm download cache (~/.npm) keyed on the rootpackage-lock.jsonhash.Expected Benefit
NuGet restore downloads can take 1-3 minutes per job. With ~11 jobs running per PR (some in parallel, some on matrix), caching saves significant CI time on repeat runs where dependencies have not changed — which is the common case.
Notes
cache: trueoption insetup-dotnet@v5is the officially recommended approach and handles both Linux and Windows paths automatically.cache: npmoption insetup-node@v5does not skipnpm install— it only caches the download cache. The actual install still runs, but is faster when packages are already cached.Warning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
Protected files
The push was rejected because GitHub Actions does not have
workflowspermission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.Create the pull request manually