-
Notifications
You must be signed in to change notification settings - Fork 510
feat: Cache NuGet global-packages folder #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi. @nogic1008, thanks a lot for that huge PR! Could you clarify a little the list of caching directories? In the PR description, you wrote that you are going to cache the |
Hi, @nogic1008 just a gentle ping 📟 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Approve.
hi @nogic1008, could you sync with the main branch? |
hi @nogic1008, just a gentle ping :) |
@IvanZosimov |
Hi, @nogic1008 👋 Thank you for the update! Could you, please, sync your PR with the |
@IvanZosimov |
Hi, @nogic1008 👋 Thanks for the update, I left several comments, please take a look. Also, may I ask you to add e2e tests? |
@IvanZosimov
|
Thanks for the update @nogic1008 ❤️! Regarding the unit tests for the |
Hi, @nogic1008 👋 Could you, please, resolve merge conflicts? As I see we got all necessary approvals, as soon as you resolve the conflicts we can make final tests and then we are ready to go 🚀 |
@IvanZosimov |
Hi, @nogic1008 👋 During testing, I found a problem, my test project failed to restore dependencies using P.S. There are also some merge conficts, sorry for that. May I ask you to solve them one more time ? 😇 |
Co-authored-by: Ivan <[email protected]>
also add guide on README
@IvanZosimov |
Hi, @nogic1008 👋 The PR is merged 🚀 Thanks a lot for your willingness to make our action better! ❤️ |
* feat: cache NuGet global-packages folder * fix: remove unused files * docs: fix incorrect action * ci: add e2e test for cache * docs: accept suggested changes on README * docs: add simple cache example * build: change main script path * fix: change relative path to install scripts * fix: change relative path to problem matcher * refactor: accept changes on cache-utils * fix: revert main script path changes * test: fix cache-utils unit test * test: fix cache-utils unit test * feat: add `cache-dependency-path` variables * build: change main script dist path * ci: add `cache-dependency-path` e2e test & missing lock file * fix: accept change suggestions * ci: copy NuGet lock file to root to pass "test-setup-with-cache" e2e test * docs: change README guide * fix: apply suggestions from code review Co-authored-by: Ivan <[email protected]> * test: fix some failed unit tests - fix `restoreCache()` test for 9703c8 - update installer script * build: rebuild dist * Update unit-tests - Additional unit test were added to setup-dotnet.test.ts * Update unit tests for unix systems * Format and lint unit tests * fix: avoid use '/' on `path.join` * fix: rebuild dist * fix: apply suggestions from code review Co-authored-by: Ivan <[email protected]> * build: add `DisableImplicitNuGetFallbackFolder` option also add guide on README * docs: highlight warnings and notes * docs: update note about handling NU1403 --------- Co-authored-by: Ivan <[email protected]> Co-authored-by: IvanZosimov <[email protected]>
Description
This PR adds the feature to cache NuGet global-packages folder. (inspired by
actions/setup-node
)Usage
This feature needs to NuGet lock file (
**/packages.lock.json
).By default, global-packages folder path is
%userprofile%\.nuget\packages
(Windows) or~/.nuget/packages
(Mac/Linux).Depending on host runners, this folder may already contain huge files. (like Xamarin)
Therefore, if there is no problem, we recommend that you specify the
NUGET_PACKAGES
environment variable to create your own cache folder.See also: https://docs.microsoft.com/nuget/consume-packages/managing-the-global-packages-and-cache-folders
Tasks
Related issue
None
Check list