ci: add caching for NuGet packages in CI workflows #522
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.
Signed-off-by: André Silva 2493377+askpt@users.noreply.github.com
This PR
This pull request enhances the CI/CD workflows by adding caching for NuGet packages across multiple workflow files. This change aims to improve build performance by avoiding repeated downloads of dependencies.
Workflow Improvements:
.github/workflows/ci.yml: Added a step to cache NuGet packages in both the main CI job and another job within the same file. This uses theactions/cacheaction to store packages in~/.nuget/packagesand leverages file hashing for cache keys. [1] [2].github/workflows/code-coverage.yml: Introduced NuGet package caching to the code coverage workflow, improving efficiency during thedotnet teststep..github/workflows/e2e.yml: Added caching for NuGet packages in the end-to-end testing workflow, reducing setup time for dependencies..github/workflows/release.yml: Implemented NuGet package caching in the release workflow to optimize dependency installation during thedotnet restorestep.Notes
This is similar to open-feature/dotnet-sdk-contrib#453