Skip to content

Commit ec08128

Browse files
committed
Simplify the test suite
1 parent f9e2279 commit ec08128

File tree

11 files changed

+3882
-5042
lines changed

11 files changed

+3882
-5042
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ jobs:
2525
- name: Setup node
2626
uses: actions/setup-node@v2-beta
2727
with:
28-
node-version: '16'
28+
node-version: '14'
2929
- name: node_modules cache
3030
uses: actions/cache@v2
3131
id: node_modules_cache
3232
with:
3333
path: ./node_modules
34-
key: ${{ runner.os }}-16-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
34+
key: ${{ runner.os }}-14-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
3535
restore-keys: |
36-
${{ runner.os }}-16-12-9-9-6-node_modules-
37-
${{ runner.os }}-16-12-9-9-
38-
${{ runner.os }}-16-12-9-
39-
${{ runner.os }}-16-12-
40-
${{ runner.os }}-16-
36+
${{ runner.os }}-14-12-9-9-6-node_modules-
37+
${{ runner.os }}-14-12-9-9-
38+
${{ runner.os }}-14-12-9-
39+
${{ runner.os }}-14-12-
40+
${{ runner.os }}-14-
4141
- name: Yarn offline cache
4242
if: steps.node_modules_cache.outputs.cache-hit != 'true'
4343
uses: actions/cache@v2
@@ -68,19 +68,11 @@ jobs:
6868
strategy:
6969
matrix:
7070
os: [ ubuntu-latest, macos-latest, windows-latest ]
71-
node: ["16"]
71+
node: ["16", "18", "20"]
7272
firebase: ["9"]
7373
firebaseTools: ["12"]
7474
rxjs: ["7"]
75-
# TODO add ng 12 back in, we need to cut a major at this point and drop
7675
ng: ["16"]
77-
exclude:
78-
# TODO investigate failures
79-
# https://github.com/angular/angularfire/runs/4174069788
80-
# Can't resolve 'core-js/proposals/reflect-metadata'
81-
- os: ubuntu-latest
82-
node: 14
83-
ng: 13
8476
fail-fast: false
8577
name: Test firebase@${{ matrix.firebase }} firebase-tools@${{ matrix.firebaseTools }} ng@${{ matrix.ng }} rxjs@${{ matrix.rxjs}} on ${{ matrix.os }} Node.js ${{ matrix.node }}
8678
steps:
@@ -122,19 +114,6 @@ jobs:
122114
yarn add firebase@${{ matrix.firebase }}
123115
yarn add firebase-tools@${{ matrix.firebaseTools }}
124116
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
125-
# Can't update more than one major at a times, take the incremental step
126-
- name: Update to ng@13
127-
run: npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
128-
if: matrix.ng == '14' || matrix.ng == '15' || matrix.ng == 'next'
129-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
130-
- name: Update to ng@14
131-
run: npx @angular/cli@14 update @angular/core@14 @angular/cli@14 --allow-dirty --force
132-
if: matrix.ng == '15' || matrix.ng == 'next'
133-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
134-
- name: Update to ng@${{ matrix.ng }}
135-
run: npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
136-
if: matrix.ng != '12'
137-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
138117
- name: Firebase emulator cache
139118
uses: actions/cache@v2
140119
with:
@@ -144,48 +123,22 @@ jobs:
144123
uses: actions/download-artifact@v2
145124
- name: Relocate Artifacts
146125
run: mv angularfire-${{ github.run_id }} dist
147-
- name: Test Node (CJS)
148-
run: |
149-
yarn build:jasmine
150-
yarn test:node
151-
if: matrix.ng == '12'
152-
- name: Test Node (ESM)
126+
- name: Test Node
153127
run: |
154128
yarn build:jasmine
155129
yarn test:node-esm
156-
if: matrix.ng != '12' && matrix.rxjs == '7'
157130
- name: Test browser
158-
if: matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '11'
131+
if: matrix.os == 'ubuntu-latest' && matrix.node == '16'
159132
run: yarn test:chrome-headless
160133
- name: ng-build yarn install
161134
run: |
162135
cd ./test/ng-build
163136
yarn --prefer-offline
164137
yarn add firebase@${{ matrix.firebase }}
165-
- name: Update ng-build to ng@13
166-
run: |
167-
cd ./test/ng-build
168-
npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
169-
if: matrix.ng == '14' || matrix.ng == '15' || matrix.ng == 'next'
170-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
171-
- name: Update ng-build to ng@14
172-
run: |
173-
cd ./test/ng-build
174-
npx @angular/cli@14 update @angular/core@14 @angular/cli@14 @nguniversal/express-engine@14 --allow-dirty --force
175-
if: matrix.ng == '15' || matrix.ng == 'next'
176-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
177-
- name: Update ng-build to ng@${{ matrix.ng }}
178-
run: |
179-
cd ./test/ng-build
180-
npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
181-
if: matrix.ng != '12'
182-
continue-on-error: ${{ matrix.os == 'windows-latest' }}
183138
- name: ng-build prerender
184139
run: |
185140
cd ./test/ng-build
186141
yarn prerender
187-
# ng 13 is flaking, skip for now
188-
if: matrix.ng != '13'
189142
190143
# TODO dry up
191144
canary:
@@ -246,16 +199,6 @@ jobs:
246199
yarn add firebase@${{ matrix.firebase }}
247200
yarn add firebase-tools@${{ matrix.firebaseTools }}
248201
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
249-
# Can't update more than one major at a times, take the incremental step
250-
- name: Update to ng@13
251-
run: npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
252-
if: matrix.ng == '14' || matrix.ng == '15' || matrix.ng == 'next'
253-
- name: Update to ng@14
254-
run: npx @angular/cli@14 update @angular/core@14 @angular/cli@14 --allow-dirty --force
255-
if: matrix.ng == '15' || matrix.ng == 'next'
256-
- name: Update to ng@${{ matrix.ng }}
257-
run: npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
258-
if: matrix.ng != '12'
259202
- name: Firebase emulator cache
260203
uses: actions/cache@v2
261204
with:
@@ -265,16 +208,10 @@ jobs:
265208
uses: actions/download-artifact@v2
266209
- name: Relocate Artifacts
267210
run: mv angularfire-${{ github.run_id }} dist
268-
- name: Test Node (CJS)
269-
run: |
270-
yarn build:jasmine
271-
yarn test:node
272-
if: matrix.ng == '12'
273-
- name: Test Node (ESM)
211+
- name: Test Node
274212
run: |
275213
yarn build:jasmine
276214
yarn test:node-esm
277-
if: matrix.ng != '12'
278215
- name: Test browser
279216
run: yarn test:chrome-headless
280217
- name: ng-build yarn install
@@ -288,35 +225,18 @@ jobs:
288225
cd ./test/ng-build
289226
sed -i 's/"skipLibCheck": false,/"skipLibCheck": true,/g' tsconfig.json
290227
if: matrix.firebase == 'canary'
291-
- name: Update ng-build to ng@13
292-
run: |
293-
cd ./test/ng-build
294-
npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
295-
if: matrix.ng == '14' || matrix.ng == '15' || matrix.ng == 'next'
296-
- name: Update ng-build to ng@14
297-
run: |
298-
cd ./test/ng-build
299-
npx @angular/cli@14 update @angular/core@14 @angular/cli@14 @nguniversal/express-engine@14 --allow-dirty --force
300-
if: matrix.ng == '15' || matrix.ng == 'next'
301-
- name: Update ng-build to ng@${{ matrix.ng }}
302-
run: |
303-
cd ./test/ng-build
304-
npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
305-
if: matrix.ng != '12'
306228
- name: ng-build prerender
307229
run: |
308230
cd ./test/ng-build
309231
yarn prerender
310-
# ng 13 is flaking, skip for now
311-
if: matrix.ng != '13'
312232
313233
contribute:
314234
runs-on: ${{ matrix.os }}
315235
name: Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
316236
strategy:
317237
matrix:
318238
os: [ ubuntu-latest, macos-latest, windows-latest ]
319-
node: ["14", "16"]
239+
node: ["14"]
320240
exclude:
321241
# we build with this combination, safely skip
322242
- os: ubuntu-latest

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ AngularFire doesn't follow Angular's versioning as Firebase also has breaking ch
6969

7070
| Angular | Firebase | AngularFire |
7171
| --------|----------|--------------|
72+
| 16 | 9 | ^7.6 |
7273
| 15 | 9 | ^7.5 |
7374
| 14 | 9 | ^7.4 |
7475
| 13 | 9 | ^7.2 |

test/ng-build/.browserslistrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/ng-build/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ chrome-profiler-events*.json
3131
.history/*
3232

3333
# misc
34+
/.angular/cache
3435
/.sass-cache
3536
/connect.lock
3637
/coverage

test/ng-build/angular.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@
125125
"development": {
126126
"optimization": false,
127127
"sourceMap": true,
128-
"extractLicenses": false
128+
"extractLicenses": false,
129+
"vendorChunk": true,
130+
"buildOptimizer": false
129131
}
130132
},
131133
"defaultConfiguration": "production"
@@ -165,6 +167,5 @@
165167
}
166168
}
167169
}
168-
},
169-
"defaultProject": "ng-build"
170+
}
170171
}

test/ng-build/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "~12.2.0",
17-
"@angular/common": "~12.2.0",
18-
"@angular/compiler": "~12.2.0",
19-
"@angular/core": "~12.2.0",
20-
"@angular/forms": "~12.2.0",
21-
"@angular/platform-browser": "~12.2.0",
22-
"@angular/platform-browser-dynamic": "~12.2.0",
23-
"@angular/platform-server": "~12.2.0",
24-
"@angular/router": "~12.2.0",
25-
"@nguniversal/express-engine": "12",
16+
"@angular/animations": "^16.0.3",
17+
"@angular/common": "^16.0.3",
18+
"@angular/compiler": "^16.0.3",
19+
"@angular/core": "^16.0.3",
20+
"@angular/forms": "^16.0.3",
21+
"@angular/platform-browser": "^16.0.3",
22+
"@angular/platform-browser-dynamic": "^16.0.3",
23+
"@angular/platform-server": "^16.0.3",
24+
"@angular/router": "^16.0.3",
25+
"@nguniversal/express-engine": "16.0.2",
2626
"express": "^4.15.2",
2727
"firebase": "^9.6.9",
2828
"firebase-admin": "^10.0.2",
2929
"rxjs": "~6.6.0",
3030
"tslib": "^2.3.0",
31-
"zone.js": "~0.11.4"
31+
"zone.js": "~0.13.0"
3232
},
3333
"devDependencies": {
34-
"@angular-devkit/build-angular": "~12.2.16",
35-
"@angular/cli": "~12.2.16",
36-
"@angular/compiler-cli": "~12.2.0",
34+
"@angular-devkit/build-angular": "^16.0.3",
35+
"@angular/cli": "^16.0.3",
36+
"@angular/compiler-cli": "^16.0.3",
3737
"@firebase/app-check-types": "^0.4.0",
38-
"@nguniversal/builders": "^12.1.3",
38+
"@nguniversal/builders": "^16.0.2",
3939
"@types/express": "^4.17.0",
4040
"@types/node": "^12.11.1",
41-
"typescript": "~4.3.5"
41+
"typescript": "~4.9.5"
4242
}
43-
}
43+
}

test/ng-build/src/main.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ if (environment.production) {
1616
}
1717

1818
export { AppServerModule } from './app/app.server.module';
19-
export { renderModule, renderModuleFactory } from '@angular/platform-server';
19+
export { renderModuleFactory } from '@angular/platform-server';

test/ng-build/src/polyfills.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/**
22-
* IE11 requires the following for NgClass support on SVG elements
23-
*/
24-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
25-
26-
/**
27-
* Web Animations `@angular/platform-browser/animations`
28-
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
29-
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
30-
*/
31-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
32-
3321
/**
3422
* By default, zone.js will patch all possible macroTask and DomEvents
3523
* user can disable parts of macroTask/DomEvents patch by setting following flags

test/ng-build/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
"skipLibCheck": true,
1616
"moduleResolution": "node",
1717
"importHelpers": true,
18-
"target": "es2017",
18+
"target": "ES2022",
1919
"module": "es2020",
2020
"lib": [
2121
"es2018",
2222
"dom"
23-
]
23+
],
24+
"useDefineForClassFields": false
2425
},
2526
"angularCompilerOptions": {
2627
"enableI18nLegacyMessageIdFormat": false,

test/ng-build/tsconfig.server.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"extends": "./tsconfig.app.json",
44
"compilerOptions": {
55
"outDir": "./out-tsc/server",
6-
"target": "es2019",
76
"types": [
87
"node"
98
]

0 commit comments

Comments
 (0)