-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 NPM caching built into action/setup-node
#33190
Conversation
As of version 2.2.2, caching for NPM dependencies is now built into the `action/setup-action` action. See https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/ for more information.
Size Change: 0 B Total Size: 1.05 MB ℹ️ View Unchanged
|
This is mostly to retrigger workflows now that a cache exists to test the new built in caching for `actions/setup-node`.
The `npm install` runs for a separate directory, which could cause a very small subset of packages to be cached.
In general, this method of caching seems to result in meaningful reduction of time for the Some notes:
|
…se-setup-node-caching
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.
It looks good to me and aligns with what I saw in the official announcement from GitHub for action/setup-node
. If CI passes, we can proceed 😄
As of version 2.2.2, caching for NPM dependencies is now built into the `action/setup-action` action. See https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/ for more information. * Consistently include an empty line before `steps`. * Continue using the old caching method for the pull request workflow. The `npm install` runs for a separate directory, which could cause a very small subset of packages to be cached. (cherry picked from commit 138d5f1)
As of version 2.2.2, caching for NPM dependencies is now built into the `action/setup-action` action. See https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/ for more information. * Consistently include an empty line before `steps`. * Continue using the old caching method for the pull request workflow. The `npm install` runs for a separate directory, which could cause a very small subset of packages to be cached.
Description
As of version 2.2.2, caching for NPM dependencies is now built into the
action/setup-action
action. This simplifies workflows utilizing NPM by eliminating the need for a separate step usingactions/cache
.The cache key used will be
${{ runner.os }}-npm-${{ hashFiles('') }}
, which is the same cache as recommended in theactions/cache
documentation.See actions/setup-node#272 or https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/ for more information.
Checklist:
*.native.js
files for terms that need renaming or removal).