49
49
if : steps.node_modules_cache.outputs.cache-hit != 'true'
50
50
run : |
51
51
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
52
+ yarn config set network-timeout 300000
52
53
yarn config set yarn-offline-mirror-pruning true
53
54
yarn install --frozen-lockfile --prefer-offline
54
55
- name : Build
67
68
strategy :
68
69
matrix :
69
70
os : [ ubuntu-latest, macos-latest, windows-latest ]
70
- node : ["12", "14", "16"]
71
+ node : [ "14", "16"]
71
72
firebase : ["9"]
72
- firebaseTools : ["9", " 10"]
73
+ firebaseTools : ["10"]
73
74
rxjs : ["6", "7"]
74
75
ng : ["12", "13"]
75
76
exclude :
@@ -110,6 +111,7 @@ jobs:
110
111
- name : Configure yarn
111
112
run : |
112
113
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
114
+ yarn config set network-timeout 300000
113
115
yarn config set ignore-engines true
114
116
- name : Yarn install
115
117
if : steps.node_modules_cache.outputs.cache-hit != 'true'
@@ -119,7 +121,15 @@ jobs:
119
121
yarn add firebase@${{ matrix.firebase }}
120
122
yarn add firebase-tools@${{ matrix.firebaseTools }}
121
123
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
122
- npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
124
+ # Can't update more than one major at a times, take the incremental step
125
+ - name : Update to ng@13
126
+ run : npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
127
+ if : matrix.ng == '14' || matrix.ng == 'next'
128
+ continue-on-error : ${{ matrix.os == 'windows-latest' }}
129
+ - name : Update to ng@${{ matrix.ng }}
130
+ run : npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
131
+ if : matrix.ng != '12'
132
+ continue-on-error : ${{ matrix.os == 'windows-latest' }}
123
133
- name : Firebase emulator cache
124
134
uses : actions/cache@v2
125
135
with :
@@ -129,25 +139,53 @@ jobs:
129
139
uses : actions/download-artifact@v2
130
140
- name : Relocate Artifacts
131
141
run : mv angularfire-${{ github.run_id }} dist
132
- - name : Test node
142
+ - name : Test Node (CJS)
133
143
run : |
134
144
yarn build:jasmine
135
145
yarn test:node
146
+ if : matrix.ng == '12'
147
+ - name : Test Node (ESM)
148
+ run : |
149
+ yarn build:jasmine
150
+ yarn test:node-esm
151
+ if : matrix.ng != '12' && matrix.rxjs == '7'
136
152
- name : Test browser
137
- if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9 '
153
+ if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '10 '
138
154
run : yarn test:chrome-headless
155
+ - name : ng-build yarn install
156
+ run : |
157
+ cd ./test/ng-build
158
+ yarn --prefer-offline
159
+ yarn add firebase@${{ matrix.firebase }}
160
+ - name : Update ng-build to ng@13
161
+ run : |
162
+ cd ./test/ng-build
163
+ npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
164
+ if : matrix.ng == '14' || matrix.ng == 'next'
165
+ continue-on-error : ${{ matrix.os == 'windows-latest' }}
166
+ - name : Update ng-build to ng@${{ matrix.ng }}
167
+ run : |
168
+ cd ./test/ng-build
169
+ npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
170
+ if : matrix.ng != '12'
171
+ continue-on-error : ${{ matrix.os == 'windows-latest' }}
172
+ - name : ng-build prerender
173
+ run : |
174
+ cd ./test/ng-build
175
+ yarn prerender
139
176
140
177
# TODO dry up
141
178
canary :
142
179
runs-on : ${{ matrix.os }}
143
- if : ${{ github.ref == 'refs/heads/master' }}
144
- needs : [ 'build', 'test' ]
180
+ # if: ${{ github.ref == 'refs/heads/master' }}
181
+ # needs: [ 'build', 'test' ]
182
+ needs : [ 'build' ]
145
183
strategy :
146
184
matrix :
147
185
os : [ ubuntu-latest ]
148
186
node : ["14"]
149
187
firebase : ["9", "canary", "next"]
150
- firebaseTools : ["9", " 10"]
188
+ firebaseTools : ["10"]
151
189
rxjs : ["7"]
152
190
ng : ["12", "13", "next"]
153
191
exclude :
@@ -187,6 +225,7 @@ jobs:
187
225
- name : Configure yarn
188
226
run : |
189
227
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
228
+ yarn config set network-timeout 300000
190
229
yarn config set ignore-engines true
191
230
- name : Yarn install
192
231
if : steps.node_modules_cache.outputs.cache-hit != 'true'
@@ -196,7 +235,13 @@ jobs:
196
235
yarn add firebase@${{ matrix.firebase }}
197
236
yarn add firebase-tools@${{ matrix.firebaseTools }}
198
237
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
199
- npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
238
+ # Can't update more than one major at a times, take the incremental step
239
+ - name : Update to ng@13
240
+ run : npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
241
+ if : matrix.ng == '14' || matrix.ng == 'next'
242
+ - name : Update to ng@${{ matrix.ng }}
243
+ run : npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
244
+ if : matrix.ng != '12'
200
245
- name : Firebase emulator cache
201
246
uses : actions/cache@v2
202
247
with :
@@ -206,21 +251,51 @@ jobs:
206
251
uses : actions/download-artifact@v2
207
252
- name : Relocate Artifacts
208
253
run : mv angularfire-${{ github.run_id }} dist
209
- - name : Test node
254
+ - name : Test Node (CJS)
210
255
run : |
211
256
yarn build:jasmine
212
257
yarn test:node
258
+ if : matrix.ng == '12'
259
+ - name : Test Node (ESM)
260
+ run : |
261
+ yarn build:jasmine
262
+ yarn test:node-esm
263
+ if : matrix.ng != '12'
213
264
- name : Test browser
214
- if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
215
265
run : yarn test:chrome-headless
266
+ - name : ng-build yarn install
267
+ run : |
268
+ cd ./test/ng-build
269
+ yarn --prefer-offline
270
+ yarn add firebase@${{ matrix.firebase }}
271
+ # on @canary firebase-admin and firebase database-types conflict, skip the lib check for now
272
+ - name : ng-build skipLibCheck
273
+ run : |
274
+ cd ./test/ng-build
275
+ sed -i 's/"skipLibCheck": false,/"skipLibCheck": true,/g' tsconfig.json
276
+ if : matrix.firebase == 'canary'
277
+ - name : Update ng-build to ng@13
278
+ run : |
279
+ cd ./test/ng-build
280
+ npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
281
+ if : matrix.ng == 'next'
282
+ - name : Update ng-build to ng@${{ matrix.ng }}
283
+ run : |
284
+ cd ./test/ng-build
285
+ npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
286
+ if : matrix.ng != '12'
287
+ - name : ng-build prerender
288
+ run : |
289
+ cd ./test/ng-build
290
+ yarn prerender
216
291
217
292
contribute :
218
293
runs-on : ${{ matrix.os }}
219
294
name : Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
220
295
strategy :
221
296
matrix :
222
297
os : [ ubuntu-latest, macos-latest, windows-latest ]
223
- node : ["12", " 14", "16"]
298
+ node : ["14", "16"]
224
299
exclude :
225
300
# we build with this combination, safely skip
226
301
- os : ubuntu-latest
@@ -257,14 +332,18 @@ jobs:
257
332
if : steps.node_modules_cache.outputs.cache-hit != 'true'
258
333
run : |
259
334
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
335
+ yarn config set network-timeout 300000
260
336
yarn config set ignore-engines true
261
337
yarn install --frozen-lockfile --prefer-offline
262
338
- name : Build
263
339
run : yarn build
264
- - name : Test
265
- # TODO figure out why tests are flaking
266
- continue-on-error : true
267
- run : yarn test
340
+ - name : Test Node
341
+ run : |
342
+ npm run build:jasmine
343
+ npm run test:node
344
+ - name : Test headless
345
+ run : yarn test:chrome-headless
346
+ continue-on-error : ${{ matrix.os == 'windows-latest' }}
268
347
269
348
# Break the branch protection test into a seperate step, so we can manage the matrix more easily
270
349
test_and_contribute :
@@ -294,3 +373,11 @@ jobs:
294
373
./publish.sh
295
374
env :
296
375
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
376
+
377
+ notify :
378
+ runs-on : ubuntu-latest
379
+ name : Notify
380
+ needs : ['build', 'test', 'contribute', 'canary']
381
+ if : always()
382
+ steps :
383
+ - run : echo ${{ github.run_id }}
0 commit comments