11---
2-
32name : CI
43
54on :
@@ -12,14 +11,23 @@ jobs:
1211
1312 steps :
1413 - name : Checkout
15- uses : actions/checkout@v2
14+ uses : actions/checkout@v4
1615
1716 - name : Setup Node.js
18- uses : actions/setup-node@v2
17+ uses : actions/setup-node@v4
18+ with :
19+ cache : npm
20+ node-version-file : .tool-versions
21+
22+ - id : cache
23+ name : Cache
24+ uses : actions/cache@v4
1925 with :
20- node-version : 14
26+ path : ./node_modules
27+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2128
22- - name : Install
29+ - if : steps.cache.outputs.cache-hit != 'true'
30+ name : Install
2331 run : npm ci
2432
2533 - name : Lint
@@ -31,17 +39,26 @@ jobs:
3139
3240 steps :
3341 - name : Checkout
34- uses : actions/checkout@v2
42+ uses : actions/checkout@v4
3543
3644 - name : Setup Node.js
37- uses : actions/setup-node@v2
45+ uses : actions/setup-node@v4
3846 with :
39- node-version : 14
47+ cache : npm
48+ node-version-file : .tool-versions
4049
4150 - name : Setup Markdown
4251 uses : xt0rted/markdownlint-problem-matcher@v1
4352
44- - name : Install
53+ - id : cache
54+ name : Cache
55+ uses : actions/cache@v4
56+ with :
57+ path : ./node_modules
58+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
59+
60+ - if : steps.cache.outputs.cache-hit != 'true'
61+ name : Install
4562 run : npm ci
4663
4764 - name : Lint
@@ -52,23 +69,24 @@ jobs:
5269
5370 steps :
5471 - name : Checkout
55- uses : actions/checkout@v2
72+ uses : actions/checkout@v4
5673
5774 - name : Setup Node.js
58- uses : actions/setup-node@v2
75+ uses : actions/setup-node@v4
5976 with :
60- node-version : 14
77+ cache : npm
78+ node-version-file : .tool-versions
6179
62- - name : Cache
63- id : cache
80+ - id : cache
81+ name : Cache
6482 uses : actions/cache@v4
6583 with :
6684 path : ./node_modules
6785 key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
6886
69- - name : Install
87+ - if : steps.cache.outputs.cache-hit != 'true'
88+ name : Install
7089 run : npm ci
71- if : steps.cache.outputs.cache-hit != 'true'
7290
7391 - name : Build
7492 run : npm run build
0 commit comments