@@ -70,17 +70,14 @@ jobs:
70
70
if : steps.check-changed.outcome != 'success'
71
71
id : set-output
72
72
run : echo "CHANGED=true" >> "$GITHUB_OUTPUT";
73
- - name : Archive build
74
- if : ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
75
- run : |
76
- tar -cf build.tar --exclude=.git .
77
- gzip build.tar
78
73
- name : Upload build archive
79
74
if : ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
80
- uses : actions/upload-artifact@v3
75
+ uses : actions/upload-artifact@v4
81
76
with :
82
- name : build.tar.gz
83
- path : build.tar.gz
77
+ name : dists-changed-firestore-${{ github.sha }}
78
+ path : |
79
+ packages/**/dist
80
+ repo-scripts/**/dist
84
81
retention-days : ${{ env.artifactRetentionDays }}
85
82
86
83
compat-test-chrome :
@@ -107,11 +104,9 @@ jobs:
107
104
sudo apt-get update
108
105
sudo apt-get install google-chrome-stable
109
106
- name : Download build archive
110
- uses : actions/download-artifact@v3
107
+ uses : actions/download-artifact@v4
111
108
with :
112
- name : build.tar.gz
113
- - name : Unzip build artifact
114
- run : tar xf build.tar.gz
109
+ name : dists-changed-firestore-${{ github.sha }}
115
110
- run : cp config/ci.config.json config/project.json
116
111
- name : Run compat tests
117
112
run : cd packages/firestore-compat && yarn run test:ci
@@ -143,11 +138,9 @@ jobs:
143
138
sudo apt-get update
144
139
sudo apt-get install google-chrome-stable
145
140
- name : Download build archive
146
- uses : actions/download-artifact@v3
141
+ uses : actions/download-artifact@v4
147
142
with :
148
- name : build.tar.gz
149
- - name : Unzip build artifact
150
- run : tar xf build.tar.gz
143
+ name : dists-changed-firestore-${{ github.sha }}
151
144
- run : cp config/ci.config.json config/project.json
152
145
- name : Run tests
153
146
run : cd packages/firestore && yarn run ${{ matrix.test-name }}
@@ -169,16 +162,21 @@ jobs:
169
162
node-version-file : ' .nvmrc'
170
163
cache : yarn
171
164
cache-dependency-path : yarn.lock
165
+ - name : Restore cached node_modules
166
+ uses : actions/cache@v4
167
+ id : node_modules
168
+ with :
169
+ path : " **/node_modules"
170
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
171
+ - run : yarn install --frozen-lockfile
172
172
- name : install Chrome stable
173
173
run : |
174
174
sudo apt-get update
175
175
sudo apt-get install google-chrome-stable
176
176
- name : Download build archive
177
- uses : actions/download-artifact@v3
177
+ uses : actions/download-artifact@v4
178
178
with :
179
- name : build.tar.gz
180
- - name : Unzip build artifact
181
- run : tar xf build.tar.gz
179
+ name : dists-changed-firestore-${{ github.sha }}
182
180
- name : Test setup against nightly Firestore
183
181
env :
184
182
INTEG_TESTS_GOOGLE_SERVICES : ${{ secrets.FIRESTORE_SDK_NIGHTLY_PROJECT_JSON }}
@@ -209,12 +207,17 @@ jobs:
209
207
node-version-file : ' .nvmrc'
210
208
cache : yarn
211
209
cache-dependency-path : yarn.lock
210
+ - name : Restore cached node_modules
211
+ uses : actions/cache@v4
212
+ id : node_modules
213
+ with :
214
+ path : " **/node_modules"
215
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
216
+ - run : yarn install --frozen-lockfile
212
217
- name : Download build archive
213
- uses : actions/download-artifact@v3
218
+ uses : actions/download-artifact@v4
214
219
with :
215
- name : build.tar.gz
216
- - name : Unzip build artifact
217
- run : tar xf build.tar.gz
220
+ name : dists-changed-firestore-${{ github.sha }}
218
221
- run : cp config/ci.config.json config/project.json
219
222
- name : Run compat tests
220
223
run : cd packages/firestore-compat && xvfb-run yarn run test:ci
@@ -238,17 +241,22 @@ jobs:
238
241
sudo apt-get update
239
242
sudo apt-get install firefox
240
243
- name : Download build archive
241
- uses : actions/download-artifact@v3
244
+ uses : actions/download-artifact@v4
242
245
with :
243
- name : build.tar.gz
244
- - name : Unzip build artifact
245
- run : tar xf build.tar.gz
246
+ name : dists-changed-firestore-${{ github.sha }}
246
247
- uses : actions/checkout@v4
247
248
- uses : actions/setup-node@v4
248
249
with :
249
250
node-version-file : ' .nvmrc'
250
251
cache : yarn
251
252
cache-dependency-path : yarn.lock
253
+ - name : Restore cached node_modules
254
+ uses : actions/cache@v4
255
+ id : node_modules
256
+ with :
257
+ path : " **/node_modules"
258
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
259
+ - run : yarn install --frozen-lockfile
252
260
- run : cp config/ci.config.json config/project.json
253
261
- name : Run tests
254
262
run : cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }}
@@ -268,15 +276,19 @@ jobs:
268
276
node-version-file : ' .nvmrc'
269
277
cache : yarn
270
278
cache-dependency-path : yarn.lock
279
+ - name : Restore cached node_modules
280
+ uses : actions/cache@v4
281
+ id : node_modules
282
+ with :
283
+ path : " **/node_modules"
284
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
285
+ - run : yarn install --frozen-lockfile
271
286
- name : Download build archive
272
- uses : actions/download-artifact@v3
287
+ uses : actions/download-artifact@v4
273
288
with :
274
- name : build.tar.gz
275
- - name : Unzip build artifact
276
- run : tar xf build.tar.gz
277
- - name : Test setup
278
- run : cp config/ci.config.json config/project.json
279
- npx playwright install webkit
289
+ name : dists-changed-firestore-${{ github.sha }}
290
+ - run : cp config/ci.config.json config/project.json
291
+ - run : npx playwright install webkit
280
292
- name : Run compat tests
281
293
run : cd packages/firestore-compat && yarn run test:ci
282
294
env :
@@ -294,18 +306,23 @@ jobs:
294
306
needs : build
295
307
if : ${{ needs.build.outputs.changed == 'true'}}
296
308
steps :
309
+ - uses : actions/checkout@v4
297
310
- name : Download build archive
298
- uses : actions/download-artifact@v3
311
+ uses : actions/download-artifact@v4
299
312
with :
300
- name : build.tar.gz
301
- - name : Unzip build artifact
302
- run : tar xf build.tar.gz
303
- - uses : actions/checkout@v4
313
+ name : dists-changed-firestore-${{ github.sha }}
304
314
- uses : actions/setup-node@v4
305
315
with :
306
316
node-version-file : ' .nvmrc'
307
317
cache : yarn
308
318
cache-dependency-path : yarn.lock
319
+ - name : Restore cached node_modules
320
+ uses : actions/cache@v4
321
+ id : node_modules
322
+ with :
323
+ path : " **/node_modules"
324
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
325
+ - run : yarn install --frozen-lockfile
309
326
- run : cp config/ci.config.json config/project.json
310
327
- run : npx playwright install webkit
311
328
- name : Run tests
0 commit comments