22
22
- name : Check event pull_request
23
23
if : github.event_name == 'pull_request'
24
24
run : ' echo pull_request: run workflow'
25
- - uses : actions/checkout@v3
25
+ - uses : actions/checkout@v4
26
26
if : github.event_name == 'push'
27
+ with :
28
+ persist-credentials : false
27
29
- name : Check event push
28
30
id : findPr
29
31
if : github.event_name == 'push'
@@ -45,10 +47,12 @@ jobs:
45
47
- 14
46
48
- 16
47
49
- 18
48
- - 19
50
+ - 20
49
51
steps :
50
- - uses : actions/checkout@v3
51
- - uses : actions/setup-node@v3
52
+ - uses : actions/checkout@v4
53
+ with :
54
+ persist-credentials : false
55
+ - uses : actions/setup-node@v4
52
56
with :
53
57
node-version : ' ${{ matrix.node }}'
54
58
- run : npm install --production
@@ -59,17 +63,17 @@ jobs:
59
63
runs-on : ubuntu-latest
60
64
needs : smoke
61
65
steps :
62
- - uses : actions/setup-node@v3
66
+ - uses : actions/setup-node@v4
63
67
with :
64
- node-version : 16
65
- - uses : actions/checkout@v3
68
+ node-version : lts/*
69
+ - uses : actions/checkout@v4
70
+ with :
71
+ persist-credentials : false
66
72
- name : ' Cache node_modules'
67
73
uses : actions/cache@v3
68
74
with :
69
75
path : ' ~/.npm'
70
- key : " ubuntu-latest-node-v16-${{ hashFiles('**/package-lock.json') }}"
71
- restore-keys : |
72
- ubuntu-latest-node-v16-
76
+ key : " ubuntu-latest-node-lts-${{ hashFiles('**/package-lock.json') }}"
73
77
- name : Install Dependencies
74
78
run : npm ci --ignore-scripts
75
79
- name : ' Check lint'
@@ -90,17 +94,19 @@ jobs:
90
94
- 14
91
95
- 16
92
96
- 18
93
- - 19
97
+ - 20
94
98
include :
95
99
- os : ubuntu-latest
96
100
node : 16
97
101
env :
98
102
COVERAGE : 1
99
103
steps :
100
- - uses : actions/setup-node@v3
104
+ - uses : actions/setup-node@v4
101
105
with :
102
106
node-version : ' ${{ matrix.node }}'
103
- - uses : actions/checkout@v3
107
+ - uses : actions/checkout@v4
108
+ with :
109
+ persist-credentials : false
104
110
- name : Get npm cache directory in Windows
105
111
id : npm-cache
106
112
if : ${{ matrix.os == 'windows-2019' }}
@@ -111,8 +117,6 @@ jobs:
111
117
with :
112
118
path : ${{ matrix.os == 'ubuntu-latest' && '~/.npm' || steps.npm-cache.outputs.dir }}
113
119
key : " ${{ matrix.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}"
114
- restore-keys : |
115
- ${{ matrix.os }}-node-v${{ matrix.node }}-
116
120
- name : Install Dependencies
117
121
run : npm ci --ignore-scripts
118
122
- name : Install Annotation Support
@@ -133,31 +137,69 @@ jobs:
133
137
with :
134
138
github-token : ' ${{ secrets.GITHUB_TOKEN }}'
135
139
136
- test-browser :
137
- name : ' Browser Tests '
140
+ test-browser-local :
141
+ name : Browser Test [ChromeHeadless]
138
142
needs : smoke
139
143
runs-on : ubuntu-latest
140
144
timeout-minutes : 20
141
145
# Don't run forked 'pull_request' without saucelabs token
142
146
if : github.event_name == 'push' || !github.event.pull_request.head.repo.fork
143
147
steps :
144
- - uses : actions/setup-node@v3
148
+ - uses : actions/setup-node@v4
149
+ with :
150
+ node-version : lts/*
151
+ - uses : actions/checkout@v4
152
+ with :
153
+ persist-credentials : false
154
+ - name : ' Cache node_modules'
155
+ uses : actions/cache@v3
156
+ with :
157
+ path : ' ~/.npm'
158
+ # this key is different than above, since we are running scripts
159
+ # (builds, postinstall lifecycle hooks, etc.)
160
+ key : " ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
161
+ - name : Install Dependencies
162
+ run : npm ci
163
+ - name : Run Browser Tests
164
+ run : npm start test.browser
165
+ env :
166
+ BROWSER : ChromeHeadless
167
+
168
+ test-browser-saucelabs :
169
+ name : Browser Tests on SauceLabs [${{ matrix.browser }}]
170
+ needs :
171
+ - smoke
172
+ - test-browser-local
173
+ runs-on : ubuntu-latest
174
+ timeout-minutes : 20
175
+ strategy :
176
+ matrix :
177
+ browser :
178
+ - firefox@latest
179
+ - chrome@latest
180
+ - MicrosoftEdge@latest
181
+ - safari@latest
182
+ # Don't run forked 'pull_request' without saucelabs token
183
+ if : github.event_name == 'push' || !github.event.pull_request.head.repo.fork
184
+ steps :
185
+ - uses : actions/setup-node@v4
186
+ with :
187
+ node-version : lts/*
188
+ - uses : actions/checkout@v4
145
189
with :
146
- node-version : 16
147
- - uses : actions/checkout@v3
190
+ persist-credentials : false
148
191
- name : ' Cache node_modules'
149
192
uses : actions/cache@v3
150
193
with :
151
194
path : ' ~/.npm'
152
195
# this key is different than above, since we are running scripts
153
196
# (builds, postinstall lifecycle hooks, etc.)
154
- key : " ubuntu-latest-node-full-v16-${{ hashFiles('**/package-lock.json') }}"
155
- restore-keys : |
156
- ubuntu-latest-node-full-v16-
197
+ key : " ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
157
198
- name : Install Dependencies
158
199
run : npm ci
159
200
- name : Run Browser Tests
160
201
run : npm start test.browser
161
202
env :
162
203
SAUCE_USERNAME : ${{ secrets.SAUCE_USERNAME }}
163
204
SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
205
+ BROWSER : ${{ matrix.browser }}
0 commit comments