4949 if : steps.node_modules_cache.outputs.cache-hit != 'true'
5050 run : |
5151 yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
52+ yarn config set network-timeout 300000
5253 yarn config set yarn-offline-mirror-pruning true
5354 yarn install --frozen-lockfile --prefer-offline
5455 - name : Build
6768 strategy :
6869 matrix :
6970 os : [ ubuntu-latest, macos-latest, windows-latest ]
70- node : ["12", "14", "16"]
71+ node : [ "14", "16"]
7172 firebase : ["9"]
72- firebaseTools : ["9", " 10"]
73+ firebaseTools : ["10"]
7374 rxjs : ["6", "7"]
7475 ng : ["12", "13"]
7576 exclude :
@@ -110,6 +111,7 @@ jobs:
110111 - name : Configure yarn
111112 run : |
112113 yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
114+ yarn config set network-timeout 300000
113115 yarn config set ignore-engines true
114116 - name : Yarn install
115117 if : steps.node_modules_cache.outputs.cache-hit != 'true'
@@ -119,7 +121,15 @@ jobs:
119121 yarn add firebase@${{ matrix.firebase }}
120122 yarn add firebase-tools@${{ matrix.firebaseTools }}
121123 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' }}
123133 - name : Firebase emulator cache
124134 uses : actions/cache@v2
125135 with :
@@ -129,25 +139,53 @@ jobs:
129139 uses : actions/download-artifact@v2
130140 - name : Relocate Artifacts
131141 run : mv angularfire-${{ github.run_id }} dist
132- - name : Test node
142+ - name : Test Node (CJS)
133143 run : |
134144 yarn build:jasmine
135145 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'
136152 - 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 '
138154 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
139176
140177 # TODO dry up
141178 canary :
142179 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' ]
145183 strategy :
146184 matrix :
147185 os : [ ubuntu-latest ]
148186 node : ["14"]
149187 firebase : ["9", "canary", "next"]
150- firebaseTools : ["9", " 10"]
188+ firebaseTools : ["10"]
151189 rxjs : ["7"]
152190 ng : ["12", "13", "next"]
153191 exclude :
@@ -187,6 +225,7 @@ jobs:
187225 - name : Configure yarn
188226 run : |
189227 yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
228+ yarn config set network-timeout 300000
190229 yarn config set ignore-engines true
191230 - name : Yarn install
192231 if : steps.node_modules_cache.outputs.cache-hit != 'true'
@@ -196,7 +235,13 @@ jobs:
196235 yarn add firebase@${{ matrix.firebase }}
197236 yarn add firebase-tools@${{ matrix.firebaseTools }}
198237 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'
200245 - name : Firebase emulator cache
201246 uses : actions/cache@v2
202247 with :
@@ -206,21 +251,51 @@ jobs:
206251 uses : actions/download-artifact@v2
207252 - name : Relocate Artifacts
208253 run : mv angularfire-${{ github.run_id }} dist
209- - name : Test node
254+ - name : Test Node (CJS)
210255 run : |
211256 yarn build:jasmine
212257 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'
213264 - name : Test browser
214- if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
215265 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
216291
217292 contribute :
218293 runs-on : ${{ matrix.os }}
219294 name : Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
220295 strategy :
221296 matrix :
222297 os : [ ubuntu-latest, macos-latest, windows-latest ]
223- node : ["12", " 14", "16"]
298+ node : ["14", "16"]
224299 exclude :
225300 # we build with this combination, safely skip
226301 - os : ubuntu-latest
@@ -257,14 +332,18 @@ jobs:
257332 if : steps.node_modules_cache.outputs.cache-hit != 'true'
258333 run : |
259334 yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
335+ yarn config set network-timeout 300000
260336 yarn config set ignore-engines true
261337 yarn install --frozen-lockfile --prefer-offline
262338 - name : Build
263339 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' }}
268347
269348 # Break the branch protection test into a seperate step, so we can manage the matrix more easily
270349 test_and_contribute :
@@ -294,3 +373,11 @@ jobs:
294373 ./publish.sh
295374 env :
296375 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