Skip to content

Commit 8012df6

Browse files
committed
Amended nodejs.yml GitHub workflow with newly added setup-node build in cache support
Reference: https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/
1 parent e5414dc commit 8012df6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,11 @@ jobs:
2626

2727
steps:
2828
- uses: actions/checkout@v2.3.4
29-
- name: Cache artifacts such as dependencies and build outputs
30-
uses: actions/cache@v2.1.6
31-
with:
32-
path: ~/.npm
33-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
34-
restore-keys: |
35-
${{ runner.os }}-node-
3629
- name: Use Node.js ${{ matrix.node-version }}
3730
uses: actions/setup-node@v2.2.0
3831
with:
3932
node-version: ${{ matrix.node-version }}
33+
cache: npm
4034
- run: npm ci
4135
- run: npm run build --if-present
4236
- run: npm test

0 commit comments

Comments
 (0)