Skip to content

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

@github-actions

Description

@github-actions

🤖 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 ·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions