ci: add NuGet package cache to dotnet setup steps - #287
Conversation
Add cache: true and cache-dependency-path: '**/Directory.Packages.props' to all setup-dotnet steps in ci.yml. Speeds up CI by caching restored NuGet packages across runs. Jobs affected: build (3 dotnet setup steps) + audit job (1 dotnet setup step)
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🧰 Additional context used📓 Path-based instructions (1).github/**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis PR adds .NET SDK caching to four CI jobs in the GitHub Actions workflow. Each 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
@coderabbitai autofix |
|
Claude finished @ANcpLua's task in 1m 47s —— View job Code review
Verdict: looks good — no changes requested. Walked through the diff and the surrounding workflow:
Minor caveat — not blocking, just worth knowing: if a future change adds a new package by editing only a Note: I can't push fixes to |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 45-46: The CI cache configuration for each setup-dotnet step
currently uses only cache-dependency-path: '**/Directory.Packages.props'; update
those setup-dotnet blocks to broaden cache-dependency-path so cache keys also
consider project and lock files (e.g., include patterns like '**/*.csproj',
'**/*.fsproj', '**/packages.lock.json' alongside '**/Directory.Packages.props')
so cache invalidation becomes deterministic and visible in logs; modify all four
setup-dotnet blocks referenced in the comment to use the expanded list of paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e1ebaa48-4204-4839-b326-7ea6f11eb8b6
📒 Files selected for processing (1)
.github/workflows/ci.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Agent
- GitHub Check: Backend (.NET)
- GitHub Check: Schema Drift (TypeSpec → Generated)
- GitHub Check: Regen Clean (T2)
- GitHub Check: Frontend (React)
- GitHub Check: Dependency Audit
- GitHub Check: claude-review
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (csharp)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
.github/**
⚙️ CodeRabbit configuration file
GitHub Actions workflows. Review for: action version pinning (use SHA not tags), proper secret handling (no secrets in logs), unnecessary workflow triggers, and job dependency correctness. Flag missing concurrency groups on push-triggered workflows.
Files:
.github/workflows/ci.yml
|
@coderabbitai autofix |
|
Claude finished @ANcpLua's task in 52s —— View job Claude finished review — PR looks good, no further changes needed. Code review
Verdict: approve. No commits needed. Re-checked after cache-dependency-path: |
**/Directory.Packages.props
**/*.csproj
**/*.fsproj
**/packages.lock.json
**/nuget.configVerified inputs against the tree:
This addresses the only substantive concern from the prior review (silent cache reuse when a new package was added via Pinning, secret hygiene, concurrency group, and job dependencies in |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Adds
cache: trueandcache-dependency-path: '**/Directory.Packages.props'to all foursetup-dotnetsteps inci.yml.This caches restored NuGet packages between runs, reducing CI time for the build and audit jobs.
Left as uncommitted changes on main — this PR finishes and tracks the work.
Need help on this PR? Tag
@codesmithwith what you need.