1
1
name : CI
2
2
on : [push, pull_request]
3
+ env :
4
+ NODE_VERSION_USED_FOR_DEVELOPMENT : 14
3
5
jobs :
4
6
lint :
5
7
name : Lint source files
10
12
11
13
- name : Setup Node.js
12
14
uses : actions/setup-node@v1
15
+ with :
16
+ node-version : ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
13
17
14
18
- name : Cache Node.js modules
15
19
uses : actions/cache@v2
57
61
58
62
- name : Setup Node.js
59
63
uses : actions/setup-node@v1
64
+ with :
65
+ node-version : ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
60
66
61
67
- name : Cache Node.js modules
62
68
uses : actions/cache@v2
81
87
82
88
- name : Setup Node.js
83
89
uses : actions/setup-node@v1
90
+ with :
91
+ node-version : ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
84
92
85
93
- name : Cache Node.js modules
86
94
uses : actions/cache@v2
@@ -97,25 +105,26 @@ jobs:
97
105
run : npm run testonly:cover
98
106
99
107
- name : Upload coverage to Codecov
108
+ if : ${{ always() }}
100
109
uses : codecov/codecov-action@v1
101
110
with :
102
111
file : ./coverage/tests/coverage-final.json
103
112
fail_ci_if_error : true
104
113
105
114
test :
106
- name : Run tests on Node v${{ matrix.node_version }}
115
+ name : Run tests on Node v${{ matrix.node_version_to_setup }}
107
116
runs-on : ubuntu-latest
108
117
strategy :
109
118
matrix :
110
- node_version : [10, 12, 14]
119
+ node_version_to_setup : [10, 12, 14]
111
120
steps :
112
121
- name : Checkout repo
113
122
uses : actions/checkout@v2
114
123
115
- - name : Setup Node.js v${{ matrix.node_version }}
124
+ - name : Setup Node.js v${{ matrix.node_version_to_setup }}
116
125
uses : actions/setup-node@v1
117
126
with :
118
- node-version : ${{ matrix.node_version }}
127
+ node-version : ${{ matrix.node_version_to_setup }}
119
128
120
129
- name : Cache Node.js modules
121
130
uses : actions/cache@v2
@@ -142,6 +151,8 @@ jobs:
142
151
143
152
- name : Setup Node.js
144
153
uses : actions/setup-node@v1
154
+ with :
155
+ node-version : ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
145
156
146
157
- name : Cache Node.js modules
147
158
uses : actions/cache@v2
@@ -171,6 +182,8 @@ jobs:
171
182
172
183
- name : Setup Node.js
173
184
uses : actions/setup-node@v1
185
+ with :
186
+ node-version : ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
174
187
175
188
- name : Cache Node.js modules
176
189
uses : actions/cache@v2
0 commit comments