Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#259 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions, python
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Mở .github/workflows/build-and-test.yml và kiểm tra các bước restore trong workflow build-and-test. Xác minh các đường dẫn cache và khóa lock-file được đề xuất dựa trên các lệnh restore NuGet và uv hiện có, sau đó chạy workflow hoặc các bước kiểm tra liên quan. Được xem là hoàn tất khi cả hai dependency cache đều được sử dụng và workflow vẫn hoàn tất thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 ·

Ngôn ngữ chính
F#
Star
144
Fork
10
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
23

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fable-compiler/Fable.Python

Tất cả issue của fable-compiler/Fable.Python

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.