Add NuGet caching and format-check job to CI#3388
Draft
mbroshi-stripe wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
dotnet formatanddotnet build/restorere-download NuGet packages on every CI run because there's no package cache configured. This addsactions/cache@v5to every job that runs dotnet commands, so warm runs skip the network fetch entirely.There's also no format check in CI today — developers have to remember to run
just preparelocally. This adds an explicitformat-checkjob that enforces it on every PR.What?
actions/cache@v5for~/.nuget/packagesto all six jobs that run dotnet commands:test,test-net462,build,pack,build-examples,compat. Cache key is keyed on all.csprojfiles, with an OS prefix so the Linux and Windows jobs maintain separate caches.format-checkjob (PR-only) that:fetch-depth: 0so it can diff against the base branch.csfiles changed.csfiles did change, runs both format commands fromjust formatscoped to only those files via--include, matching the repo's existing format recipe exactlySee Also
N/A
Changelog
actions/cache@v5) to all CI jobs that build or restore dotnet packages.format-checkCI job that verifiesdotnet formaton changed.csfiles for every pull request.