-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use actions/setup-node to cache pnpm store instead of doing it manually #76
base: master
Are you sure you want to change the base?
Conversation
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.
Haven't tried the old way for comparison, but can confirm this way works.
Anyone knows what the difference is between the two methods? |
I don't know if I have set this up incorrectly, but I find the manual way to be faster than using the cache from The manual way does not require us to install the packages again (as we cache Manual (~20s)Using
|
@nicolassanmar Does your “manual” setup also cache This is how I interpret the log message:
|
@dtinth You are 100% right. I thought that https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time suggested caching |
thanks guys for the discussion, makes it much more clear! I think more info about this would be appreciated to newcomers, any ideas how to improve the docs in this regard? |
I would highly suggest you show both as two different options (as opposed to replacing the existing one) - this solution won't work if you're using a self-hosted runner that has node pre-installed |
https://pnpm.io/continuous-integration#github-actions I think we should update the example to go the recommended way by using Links: |
actions/setup-node
supports the optioncache: pnpm
, so we can take advantage of that to make our workflow simpler.Note:
pnpm/action-setup
must be run BEFOREactions/setup-node
because otherwise thesetup-node
action will fail due to not being able to find the pnpm executable.