Use NPM caching built into action/setup-node#33190
Merged
Merged
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.
Member
Author
|
In general, this method of caching seems to result in meaningful reduction of time for the Some notes:
|
…se-setup-node-caching
gziolo
approved these changes
Jul 6, 2021
Member
gziolo
left a comment
There was a problem hiding this comment.
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 😄
desrosj
added a commit
that referenced
this pull request
Jul 13, 2021
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)
sarayourfriend
pushed a commit
that referenced
this pull request
Jul 15, 2021
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.
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
As of version 2.2.2, caching for NPM dependencies is now built into the
action/setup-actionaction. 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/cachedocumentation.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.jsfiles for terms that need renaming or removal).