12
12
release :
13
13
types :
14
14
- published
15
+ schedule :
16
+ - cron : 0 0 * * 1-5
15
17
16
18
jobs :
17
19
build :
@@ -29,10 +31,12 @@ jobs:
29
31
id : node_modules_cache
30
32
with :
31
33
path : ./node_modules
32
- key : ${{ runner.os }}-14-9-9-node_modules-${{ hashFiles('yarn.lock') }}
34
+ key : ${{ runner.os }}-14-9-9-6- node_modules-${{ hashFiles('yarn.lock') }}
33
35
restore-keys : |
34
- ${{ runner.os }}-14-9-9-node_modules-
35
- ${{ runner.os }}-14-9-
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-
36
40
${{ runner.os }}-14-
37
41
- name : Yarn offline cache
38
42
if : steps.node_modules_cache.outputs.cache-hit != 'true'
@@ -62,12 +66,14 @@ jobs:
62
66
needs : build
63
67
strategy :
64
68
matrix :
65
- os : [ ubuntu-latest, macos-latest, windows-latest]
69
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
66
70
node : ["12", "14", "16"]
67
71
firebase : ["9"]
68
72
firebaseTools : ["9"]
73
+ rxjs : ["6", "7"]
74
+ ng : ["12"]
69
75
fail-fast : false
70
- name : Test firebase@${{ matrix.firebase }} firebase-tools@${{ matrix.firebaseTools }} on ${{ matrix.os }} Node.js ${{ matrix.node }}
76
+ name : Test firebase@${{ matrix.firebase }} firebase-tools@${{ matrix.firebaseTools }} ng@${{ matrix.ng }} rxjs@${{ matrix.rxjs}} on ${{ matrix.os }} Node.js ${{ matrix.node }}
71
77
steps :
72
78
- name : Checkout
73
79
uses : actions/checkout@v2
@@ -81,49 +87,68 @@ jobs:
81
87
uses : actions/cache@v2
82
88
with :
83
89
path : ./node_modules
84
- key : ${{ runner.os }}-${{ matrix.node }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-node_modules-${{ hashFiles('yarn.lock') }}
90
+ key : ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix. firebase }}-${{ matrix.firebaseTools }}-${{ matrix.rxjs }}-node_modules-${{ hashFiles('yarn.lock') }}
85
91
restore-keys : |
86
- ${{ runner.os }}-${{ matrix.node }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-node_modules-
87
- ${{ runner.os }}-${{ matrix.node }}-${{ matrix.firebase }}-
92
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-${{ matrix.rxjs }}-node_modules-
93
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-
94
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-
95
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-
88
96
${{ runner.os }}-${{ matrix.node }}-
89
97
- name : Yarn offline cache
90
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
91
98
uses : actions/cache@v2
92
99
with :
93
100
path : ~/.npm-packages-offline-cache
94
101
key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
95
102
restore-keys : yarn-offline
96
- - name : Install deps
97
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
103
+ - name : Configure yarn
98
104
run : |
99
105
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
100
- yarn install --frozen-lockfile --prefer-offline --ignore-engines
101
- yarn add firebase@${{ matrix.firebase }} --prefer-offline --ignore-engines
102
- yarn add firebase-tools@${{ matrix.firebaseTools }} --prefer-offline --ignore-engines
106
+ yarn config set ignore-engines true
107
+ - name : Yarn install
108
+ if : steps.node_modules_cache.outputs.cache-hit != 'true'
109
+ run : yarn install --frozen-lockfile --prefer-offline
110
+ - name : Bump deps
111
+ run : |
112
+ yarn add firebase@${{ matrix.firebase }}
113
+ yarn add firebase-tools@${{ matrix.firebaseTools }}
114
+ yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
115
+ npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
103
116
- name : Firebase emulator cache
104
117
uses : actions/cache@v2
105
118
with :
106
119
path : ~/.cache/firebase/emulators
107
120
key : firebase_emulators
108
- - name : ' Download Artifacts'
121
+ - name : Download Artifacts
109
122
uses : actions/download-artifact@v2
110
- - name : Run tests
123
+ - name : Relocate Artifacts
124
+ run : mv angularfire-${{ github.run_id }} dist
125
+ - name : Test node
111
126
run : |
112
- mv angularfire-${{ github.run_id }} dist
127
+ yarn build:jasmine
113
128
yarn test:node
129
+ - name : Test browser
130
+ if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
131
+ run : yarn test:chrome-headless
114
132
115
- contribute :
133
+ # TODO dry up
134
+ canary :
116
135
runs-on : ${{ matrix.os }}
117
- name : Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
136
+ if : ${{ github.ref == 'refs/heads/master' }}
137
+ needs : [ 'build', 'test' ]
118
138
strategy :
119
139
matrix :
120
- os : [ ubuntu-latest, macos-latest, windows-latest ]
121
- node : ["12", "14", "16"]
140
+ os : [ ubuntu-latest ]
141
+ node : ["14"]
142
+ firebase : ["9", "canary"]
143
+ firebaseTools : ["9"]
144
+ rxjs : ["7"]
145
+ ng : ["12", "next"]
122
146
exclude :
123
- # we build with this combination, safely skip
124
- - os : ubuntu-latest
125
- node : 14
147
+ # standard configuration
148
+ - firebase : 9
149
+ ng : 12
126
150
fail-fast : false
151
+ name : Canary firebase@${{ matrix.firebase }} firebase-tools@${{ matrix.firebaseTools }} ng@${{ matrix.ng }} rxjs@${{ matrix.rxjs}} on ${{ matrix.os }} Node.js ${{ matrix.node }}
127
152
steps :
128
153
- name : Checkout
129
154
uses : actions/checkout@v2
@@ -133,64 +158,85 @@ jobs:
133
158
node-version : ${{ matrix.node }}
134
159
check-latest : true
135
160
- name : node_modules cache
136
- uses : actions/cache@v2
137
161
id : node_modules_cache
162
+ uses : actions/cache@v2
138
163
with :
139
164
path : ./node_modules
140
- key : ${{ runner.os }}-${{ matrix.node }}-9-9 -node_modules-${{ hashFiles('yarn.lock') }}
165
+ key : ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-${{ matrix.rxjs }} -node_modules-${{ hashFiles('yarn.lock') }}
141
166
restore-keys : |
142
- ${{ runner.os }}-${{ matrix.node }}-9-9-node_modules-
143
- ${{ runner.os }}-${{ matrix.node }}-9-
167
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-${{ matrix.rxjs }}-node_modules-
168
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-${{ matrix.firebaseTools }}-
169
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-${{ matrix.firebase }}-
170
+ ${{ runner.os }}-${{ matrix.node }}-${{ matrix.ng }}-
144
171
${{ runner.os }}-${{ matrix.node }}-
145
172
- name : Yarn offline cache
146
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
147
173
uses : actions/cache@v2
148
174
with :
149
175
path : ~/.npm-packages-offline-cache
150
176
key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
151
177
restore-keys : yarn-offline
152
- - name : Install deps
153
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
178
+ - name : Configure yarn
154
179
run : |
155
180
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
156
- yarn install --frozen-lockfile --prefer-offline --ignore-engines
157
- - name : Build
158
- run : yarn build
159
- # Seeing some flakes on windows, skip for now
160
- # https://github.com/angular/angularfire/runs/3593478229
161
- # not just windows
162
- # https://github.com/angular/angularfire/runs/3593535123
163
- # - name: Test
164
- # if: runner.os != 'windows'
165
- # run: yarn test
181
+ yarn config set ignore-engines true
182
+ - name : Yarn install
183
+ if : steps.node_modules_cache.outputs.cache-hit != 'true'
184
+ run : yarn install --frozen-lockfile --prefer-offline
185
+ - name : Bump deps
186
+ run : |
187
+ yarn add firebase@${{ matrix.firebase }}
188
+ yarn add firebase-tools@${{ matrix.firebaseTools }}
189
+ yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
190
+ npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
191
+ - name : Firebase emulator cache
192
+ uses : actions/cache@v2
193
+ with :
194
+ path : ~/.cache/firebase/emulators
195
+ key : firebase_emulators
196
+ - name : Download Artifacts
197
+ uses : actions/download-artifact@v2
198
+ - name : Relocate Artifacts
199
+ run : mv angularfire-${{ github.run_id }} dist
200
+ - name : Test node
201
+ run : |
202
+ yarn build:jasmine
203
+ yarn test:node
204
+ - name : Test browser
205
+ if : matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
206
+ run : yarn test:chrome-headless
166
207
167
- headless :
168
- runs-on : ubuntu-latest
169
- needs : build
170
- name : Test firebase@${{ matrix.firebase }} on ${{ matrix.browser }}
208
+ contribute :
209
+ runs-on : ${{ matrix.os }}
210
+ name : Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
171
211
strategy :
172
212
matrix :
173
- firebase : ["9"]
174
- browser : ["chrome", "firefox"]
213
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
214
+ node : ["12", "14", "16"]
215
+ exclude :
216
+ # we build with this combination, safely skip
217
+ - os : ubuntu-latest
218
+ node : 14
175
219
fail-fast : false
176
220
steps :
177
221
- name : Checkout
178
222
uses : actions/checkout@v2
179
223
- name : Setup node
180
224
uses : actions/setup-node@v2-beta
181
225
with :
182
- node-version : ' 14 '
226
+ node-version : ${{ matrix.node }}
183
227
check-latest : true
184
228
- name : node_modules cache
185
- id : node_modules_cache
186
229
uses : actions/cache@v2
230
+ id : node_modules_cache
187
231
with :
188
232
path : ./node_modules
189
- key : ${{ runner.os }}-14- ${{ matrix.firebase }}-9 -node_modules-${{ hashFiles('yarn.lock') }}
233
+ key : ${{ runner.os }}-${{ matrix.node }}-12-9-9-6 -node_modules-${{ hashFiles('yarn.lock') }}
190
234
restore-keys : |
191
- ${{ runner.os }}-14-${{ matrix.firebase }}-9-node_modules-
192
- ${{ runner.os }}-14-9-
193
- ${{ runner.os }}-14-
235
+ ${{ runner.os }}-${{ matrix.node }}-12-9-9-6-node_modules-
236
+ ${{ runner.os }}-${{ matrix.node }}-12-9-9-
237
+ ${{ runner.os }}-${{ matrix.node }}-12-9-
238
+ ${{ runner.os }}-${{ matrix.node }}-12-
239
+ ${{ runner.os }}-${{ matrix.node }}-
194
240
- name : Yarn offline cache
195
241
if : steps.node_modules_cache.outputs.cache-hit != 'true'
196
242
uses : actions/cache@v2
@@ -202,75 +248,27 @@ jobs:
202
248
if : steps.node_modules_cache.outputs.cache-hit != 'true'
203
249
run : |
204
250
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
251
+ yarn config set ignore-engines true
205
252
yarn install --frozen-lockfile --prefer-offline
206
- yarn add firebase@${{ matrix.firebase }} --prefer-offline
207
- - name : Firebase emulator cache
208
- uses : actions/cache@v2
209
- with :
210
- path : ~/.cache/firebase/emulators
211
- key : firebase_emulators
212
- - name : ' Download Artifacts'
213
- uses : actions/download-artifact@v2
214
- - name : Run tests
215
- run : |
216
- mv angularfire-${{ github.run_id }} dist
217
- yarn test:${{ matrix.browser }}-headless
253
+ - name : Build
254
+ run : yarn build
255
+ - name : Test
256
+ # TODO figure out why tests are flaking
257
+ continue-on-error : true
258
+ run : yarn test
218
259
219
- # safari:
220
- # runs-on: macos-latest
221
- # needs: build
222
- # name: Test firebase@${{ matrix.firebase }} on safari
223
- # strategy:
224
- # matrix:
225
- # firebase: ["beta"]
226
- # fail-fast: false
227
- # steps:
228
- # - name: Checkout
229
- # uses: actions/checkout@v2
230
- # - name: Setup node
231
- # uses: actions/setup-node@v2-beta
232
- # with:
233
- # node-version: '14'
234
- # check-latest: true
235
- # - name: node_modules cache
236
- # id: node_modules_cache
237
- # uses: actions/cache@v2
238
- # with:
239
- # path: ./node_modules
240
- # key: ${{ runner.os }}-14-${{ matrix.firebase }}-9-node_modules-${{ hashFiles('yarn.lock') }}
241
- # restore-keys: |
242
- # ${{ runner.os }}-14-${{ matrix.firebase }}-9-node_modules-
243
- # ${{ runner.os }}-14-${{ matrix.firebase }}-
244
- # ${{ runner.os }}-14-
245
- # - name: Yarn offline cache
246
- # if: steps.node_modules_cache.outputs.cache-hit != 'true'
247
- # uses: actions/cache@v2
248
- # with:
249
- # path: ~/.npm-packages-offline-cache
250
- # key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
251
- # restore-keys: yarn-offline
252
- # - name: Install deps
253
- # if: steps.node_modules_cache.outputs.cache-hit != 'true'
254
- # run: |
255
- # yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
256
- # yarn install --frozen-lockfile --prefer-offline
257
- # yarn add firebase@${{ matrix.firebase }} --prefer-offline
258
- # - name: Firebase emulator cache
259
- # uses: actions/cache@v2
260
- # with:
261
- # path: ~/.cache/firebase/emulators
262
- # key: firebase_emulators
263
- # - name: 'Download Artifacts'
264
- # uses: actions/download-artifact@v2
265
- # - name: Run tests
266
- # run: |
267
- # mv angularfire-${{ github.run_id }} dist
268
- # yarn test:safari
260
+ # Break the branch protection test into a seperate step, so we can manage the matrix more easily
261
+ test_and_contribute :
262
+ runs-on : ubuntu-latest
263
+ name : Branch protection
264
+ needs : ['test', 'contribute']
265
+ steps :
266
+ - run : true
269
267
270
268
publish :
271
269
runs-on : ubuntu-latest
272
270
name : Publish (NPM)
273
- needs : ['build', 'test', 'headless' ]
271
+ needs : ['build', 'test']
274
272
if : ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
275
273
steps :
276
274
- name : Setup node
0 commit comments