Skip to content

Cache NuGet packages in CI - #509

Open
Trosper3 wants to merge 1 commit into
CSharpAPIfrom
chore/cache-nuget-packages-ci
Open

Cache NuGet packages in CI#509
Trosper3 wants to merge 1 commit into
CSharpAPIfrom
chore/cache-nuget-packages-ci

Conversation

@Trosper3

Copy link
Copy Markdown
Contributor

Summary

  • .github/workflows/main.yml used actions/setup-dotnet@v6 with no NuGet caching, so every PR run did a full cold restore.
  • Adds cache: true with an explicit cache-dependency-path pointing at the repo's two .csproj files (API.csproj, redux-tests/redux-tests.csproj) — there's no packages.lock.json in 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 validated (yaml.safe_load)
  • dotnet build Redux.slnx --configuration Release on the rebased branch — clean, 0 warnings/errors
  • Actual cache hit/restore-time improvement will show up on this PR's own CI run and subsequent ones

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
@github-actions

Copy link
Copy Markdown

Redux Build System — CI Report

dotnet · commit b4a6e05

Operation Status Summary Time
audit no known vulnerabilities 4.5s
format-check all files formatted 23.1s
lint 0 issues 36.9s
typecheck ⏭️ covered by lint (dotnet build)
unit-test 898 passed · coverage 70% (min 80%) 45.3s
build built local/redux:ci · 234MB 40.7s
integration-test ⏭️ no [integration] command
push ⏭️ not implemented

Overall: ❌ 4 passed · 1 failed · 3 skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI does not cache NuGet packages

1 participant