[Repo Assist] [Eng] Add NuGet and npm package caching to CI workflow

Aperta Adatta ai principianti
#4,522 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
fsharp, github-actions, node.js
Ambito
ci-cd

Direzione di ricerca

Inizia da .github/workflows/build.yml e rivedi tutti i passaggi dell’ambiente Setup .NET e Setup Node.js. Verifica che le impostazioni della cache coprano gli 11 passaggi .NET e i 5 passaggi Node.js, quindi esegui il workflow CI per verificare che i job vengano completati e che le cache delle dipendenze vengano utilizzate nelle esecuzioni successive.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agentic-workflows automation repo-assist

🤖 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: 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.

Protected files

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

Generated by Repo Assist · ● 10.4M · ◷

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f
Lingua principale
F#
Stelle
3.2k
Fork
335
Merge medio
18h 54m
PR unite (30g)
155

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fable-compiler/Fable

Tutte le issue di fable-compiler/Fable

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.