Cache NuGet packages in CI - #509
Open
Trosper3 wants to merge 1 commit into
Open
Conversation
setup-dotnet ran a full cold restore on every PR run with no caching. Enables cache: true keyed on the two csproj files (no packages.lock.json exists in this repo, so cache-dependency-path is pointed at the project files directly rather than relying on the default lock-file glob). Closes #460
Redux Build System — CI Report
Overall: ❌ 4 passed · 1 failed · 3 skipped |
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.
Summary
.github/workflows/main.ymlusedactions/setup-dotnet@v6with no NuGet caching, so every PR run did a full coldrestore.cache: truewith an explicitcache-dependency-pathpointing at the repo's two.csprojfiles (API.csproj,redux-tests/redux-tests.csproj) — there's nopackages.lock.jsonin this repo, so the default lock-file glob wouldn't pick up a cache key; pointing at the project files directly means the cache still invalidates correctly when dependencies change.Closes #460
Test plan
yaml.safe_load)dotnet build Redux.slnx --configuration Releaseon the rebased branch — clean, 0 warnings/errors