Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#53584 closed enhancement (fixed)

Update `actions/setup-node` and use the builtin cache feature

Reported by: desrosj's profile desrosj Owned by: desrosj's profile desrosj
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


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 using actions/cache.

The cache key used will be ${{ runner.os }}-npm-${{ hashFiles('') }}, which is the same cache as recommended in the actions/cache documentation.

See actions/setup-node#272 or for more information.

Change History (2)

#2 @desrosj
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 51341:

Build/Test Tools: Use caching built into actions/setup-node.

This updates the actions/setup-node action to version 2.2.2 and takes advantage of the cache feature now built in. This removes the need for an additional step using actions/cache to cache NPM dependencies.

The cache key used will be ${{ runner.os }}-npm-${{ hashFiles('') }}, which matches the recommendation in the actions/cache documentation and the key currently in use in the WordPress workflows.

Props gziolo.
Fixes #53584.

Note: See TracTickets for help on using tickets.