[Repo Assist] ci: add NuGet and uv dependency caching to build-and-test workflow
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
调研方向
打开 .github/workflows/build-and-test.yml,检查 build-and-test workflow 中的 restore 步骤。根据现有的 NuGet 和 uv restore 命令,验证提议的缓存路径和 lock-file 键,然后运行 workflow 或相关检查。当两个依赖缓存都被使用且 workflow 仍能成功完成时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
🤖 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.lockoruv.lockchanges, 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 DeniedThis 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
# 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 · ◷
- 主要语言
- F#
- 星标
- 144
- 派生
- 10
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 23
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fable-compiler/Fable.Python 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
fable-compiler/Fable.Python#117 ·
-
Pandas binding 未关闭help wanted
难度 5/5 一周以上 新手友好度 25/100
fable-compiler/Fable.Python#65 · 5 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
fable-compiler/Fable.Python#48 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 20/100
fable-compiler/Fable.Python#5 · 7 条评论 ·
查看 fable-compiler/Fable.Python 的全部 Issue
相似的 Issue
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
Automattic/blocks-engine#2161 ·
-
难度 1/5 1 小时以内 新手友好度 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
personalrobotics/tsr#128 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Azure/azure-functions-docker#1257 ·