Skip to content

Commit 5536f2b

Browse files
committed
build: switch to setup-node cache
1 parent 571c299 commit 5536f2b

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/ci.yml

+3-21
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,8 @@ jobs:
2323
uses: actions/setup-node@v2.3.0
2424
with:
2525
node-version: ${{steps.node.outputs.version}}
26-
- name: Set up cache
27-
uses: actions/cache@v2.1.6
28-
id: cache
29-
with:
30-
path: '**/node_modules'
31-
key: npm-${{hashFiles('**/package-lock.json')}}
26+
cache: npm
3227
- name: Install packages
33-
if: steps.cache.outputs.cache-hit != 'true'
3428
run: npm ci
3529
- name: Run lint (JavaScript)
3630
run: npm run lint:js
@@ -52,14 +46,8 @@ jobs:
5246
uses: actions/setup-node@v2.3.0
5347
with:
5448
node-version: ${{steps.node.outputs.version}}
55-
- name: Set up cache
56-
uses: actions/cache@v2.1.6
57-
id: cache
58-
with:
59-
path: '**/node_modules'
60-
key: npm-${{hashFiles('**/package-lock.json')}}
49+
cache: npm
6150
- name: Install packages
62-
if: steps.cache.outputs.cache-hit != 'true'
6351
run: npm ci
6452
- name: Run tests (unit)
6553
run: npm run test:unit
@@ -83,14 +71,8 @@ jobs:
8371
uses: actions/setup-node@v2.3.0
8472
with:
8573
node-version: ${{steps.node.outputs.version}}
86-
- name: Set up cache
87-
uses: actions/cache@v2.1.6
88-
id: cache
89-
with:
90-
path: '**/node_modules'
91-
key: npm-${{hashFiles('**/package-lock.json')}}
74+
cache: npm
9275
- name: Install packages
93-
if: steps.cache.outputs.cache-hit != 'true'
9476
run: npm ci
9577
- name: Run build
9678
run: npm run build

0 commit comments

Comments
 (0)