feat: Cache NuGet global-packages folder#303
feat: Cache NuGet global-packages folder#303IvanZosimov merged 35 commits intoactions:mainfrom nogic1008:feat/nuget-cache
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 📟 |
|
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 <98037481+IvanZosimov@users.noreply.github.com>
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 <98037481+IvanZosimov@users.noreply.github.com> * 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 <98037481+IvanZosimov@users.noreply.github.com> * build: add `DisableImplicitNuGetFallbackFolder` option also add guide on README * docs: highlight warnings and notes * docs: update note about handling NU1403 --------- Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com> Co-authored-by: IvanZosimov <ivanzosimov@github.com>
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_PACKAGESenvironment 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