[Repo Assist] ci: add NuGet and uv dependency caching to build-and-test workflow

Abierto
#259 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
github-actions, python
Área
ci-cd, devops

Línea de trabajo

Abre .github/workflows/build-and-test.yml e inspecciona los pasos de restauración del workflow build-and-test. Verifica las rutas de caché y las claves de los archivos de bloqueo propuestas comparándolas con los comandos de restauración de NuGet y uv existentes, y después ejecuta el workflow o las comprobaciones pertinentes. Se considera terminado cuando se utilizan ambas cachés de dependencias y el workflow sigue completándose correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

agentic-workflows automation repo-assist

🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.

Summary

Adds dependency caching to the build-and-test CI workflow to avoid re-downloading packages on every run.

Changes

Two actions/cache@v4 steps are inserted before the restore steps:

Cache Path Key
NuGet packages ~/.nuget/packages paket.lock hash
uv Python packages ~/.cache/uv uv.lock hash

Both caches fall back to prefix-only restore keys so a partial cache hit still saves time when lock files change.

Motivation

Currently every CI run restores all .NET NuGet packages and all Python packages from scratch. These packages rarely change between commits, so caching them can cut the restore step from ~30–60 s down to a few seconds for cache hits.

Trade-offs

  • Cache invalidation is automatic: whenever paket.lock or uv.lock changes, the cache key changes and a fresh download occurs.
  • Storage is minimal (GitHub Actions cache is free up to 10 GB per repo).
  • No behavioural change — only the restore speed improves.

[!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 24596089857 -n agent -D /tmp/agent-24596089857

# Create a new branch
git checkout -b repo-assist/eng-ci-caching-2026-04-18-3e72f288219c2ec4 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24596089857/aw-repo-assist-eng-ci-caching-2026-04-18.patch

# Push the branch and create the pull request
git push origin repo-assist/eng-ci-caching-2026-04-18-3e72f288219c2ec4
gh pr create --title '[Repo Assist] ci: add NuGet and uv dependency caching to build-and-test workflow' --base main --head repo-assist/eng-ci-caching-2026-04-18-3e72f288219c2ec4 --repo fable-compiler/Fable.Python

Generated by Repo Assist · ● 2M ·

Lenguaje dominante
F#
Estrellas
144
Forks
10
Merge medio
1 d 16 h
PR fusionados (30 d)
23

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fable-compiler/Fable.Python

Todos los issues de fable-compiler/Fable.Python

Issues similares

Más issues de DevOps

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.