1
1
---
2
-
3
2
name : CI
4
3
5
4
on :
@@ -12,14 +11,23 @@ jobs:
12
11
13
12
steps :
14
13
- name : Checkout
15
- uses : actions/checkout@v2
14
+ uses : actions/checkout@v4
16
15
17
16
- 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
19
25
with :
20
- node-version : 14
26
+ path : ./node_modules
27
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
21
28
22
- - name : Install
29
+ - if : steps.cache.outputs.cache-hit != 'true'
30
+ name : Install
23
31
run : npm ci
24
32
25
33
- name : Lint
@@ -31,17 +39,26 @@ jobs:
31
39
32
40
steps :
33
41
- name : Checkout
34
- uses : actions/checkout@v2
42
+ uses : actions/checkout@v4
35
43
36
44
- name : Setup Node.js
37
- uses : actions/setup-node@v2
45
+ uses : actions/setup-node@v4
38
46
with :
39
- node-version : 14
47
+ cache : npm
48
+ node-version-file : .tool-versions
40
49
41
50
- name : Setup Markdown
42
51
uses : xt0rted/markdownlint-problem-matcher@v1
43
52
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
45
62
run : npm ci
46
63
47
64
- name : Lint
@@ -52,23 +69,24 @@ jobs:
52
69
53
70
steps :
54
71
- name : Checkout
55
- uses : actions/checkout@v2
72
+ uses : actions/checkout@v4
56
73
57
74
- name : Setup Node.js
58
- uses : actions/setup-node@v2
75
+ uses : actions/setup-node@v4
59
76
with :
60
- node-version : 14
77
+ cache : npm
78
+ node-version-file : .tool-versions
61
79
62
- - name : Cache
63
- id : cache
80
+ - id : cache
81
+ name : Cache
64
82
uses : actions/cache@v4
65
83
with :
66
84
path : ./node_modules
67
85
key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
68
86
69
- - name : Install
87
+ - if : steps.cache.outputs.cache-hit != 'true'
88
+ name : Install
70
89
run : npm ci
71
- if : steps.cache.outputs.cache-hit != 'true'
72
90
73
91
- name : Build
74
92
run : npm run build
0 commit comments