@@ -37,23 +37,17 @@ jobs:
37
37
with :
38
38
# This makes Actions fetch all Git history so run-changed script can diff properly.
39
39
fetch-depth : 0
40
+ - uses : actions/setup-node@v4
41
+ with :
42
+ node-version-file : .nvmrc
40
43
- name : install Chrome stable
41
44
run : |
42
45
sudo apt-get update
43
46
sudo apt-get install google-chrome-stable
44
- - uses : actions/setup-node@v4
45
- with :
46
- node-version-file : ' .nvmrc'
47
- cache : yarn
48
- cache-dependency-path : yarn.lock
49
- - name : Restore cached node_modules
50
- uses : actions/cache@v4
51
- id : node_modules
52
- with :
53
- path : " **/node_modules"
54
- key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
55
- - run : yarn install --frozen-lockfile
56
- - run : cp config/ci.config.json config/project.json
47
+ - name : Test setup and yarn install
48
+ run : |
49
+ cp config/ci.config.json config/project.json
50
+ yarn
57
51
- name : build
58
52
id : build
59
53
run : |
@@ -70,12 +64,17 @@ jobs:
70
64
if : steps.check-changed.outcome != 'success'
71
65
id : set-output
72
66
run : echo "CHANGED=true" >> "$GITHUB_OUTPUT";
67
+ - name : Archive build
68
+ if : ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
69
+ run : |
70
+ tar -cf build.tar --exclude=.git .
71
+ gzip build.tar
73
72
- name : Upload build archive
74
73
if : ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
75
74
uses : actions/upload-artifact@v4
76
75
with :
77
- name : build-changed-firestore- ${{ github.sha }}
78
- path : .
76
+ name : build-${{ github.sha }}
77
+ path : build.tar.gz
79
78
retention-days : ${{ env.artifactRetentionDays }}
80
79
81
80
compat-test-chrome :
@@ -84,18 +83,21 @@ jobs:
84
83
needs : build
85
84
if : ${{ needs.build.outputs.changed == 'true'}}
86
85
steps :
86
+ - uses : actions/setup-node@v4
87
+ with :
88
+ node-version-file : .nvmrc
87
89
- name : install Chrome stable
88
90
run : |
89
91
sudo apt-get update
90
92
sudo apt-get install google-chrome-stable
91
- - uses : actions/checkout@v4
92
- - uses : actions/setup-node@v4
93
- with :
94
- node-version-file : ' .nvmrc'
95
93
- name : Download build archive
96
- uses : actions/download-artifact@v4
94
+ uses : actions/download-artifact@v3
97
95
with :
98
- name : build-changed-firestore-${{ github.sha }}
96
+ name : build-${{ github.sha }}
97
+ - name : Unzip build artifact
98
+ run : tar xf build.tar.gz
99
+ - name : Test setup and yarn install
100
+ run : cp config/ci.config.json config/project.json
99
101
- name : Run compat tests
100
102
run : cd packages/firestore-compat && yarn run test:ci
101
103
@@ -108,18 +110,21 @@ jobs:
108
110
needs : build
109
111
if : ${{ needs.build.outputs.changed == 'true'}}
110
112
steps :
113
+ - uses : actions/setup-node@v4
114
+ with :
115
+ node-version-file : .nvmrc
111
116
- name : install Chrome stable
112
117
run : |
113
118
sudo apt-get update
114
119
sudo apt-get install google-chrome-stable
115
- - uses : actions/checkout@v4
116
- - uses : actions/setup-node@v4
117
- with :
118
- node-version-file : ' .nvmrc'
119
120
- name : Download build archive
120
- uses : actions/download-artifact@v4
121
+ uses : actions/download-artifact@v3
121
122
with :
122
- name : build-changed-firestore-${{ github.sha }}
123
+ name : build-${{ github.sha }}
124
+ - name : Unzip build artifact
125
+ run : tar xf build.tar.gz
126
+ - name : Test setup and yarn install
127
+ run : cp config/ci.config.json config/project.json
123
128
- name : Run tests
124
129
run : cd packages/firestore && yarn run ${{ matrix.test-name }}
125
130
env :
@@ -134,18 +139,19 @@ jobs:
134
139
needs : build
135
140
if : ${{ github.event_name != 'pull_request' }}
136
141
steps :
142
+ - uses : actions/setup-node@v4
143
+ with :
144
+ node-version-file : .nvmrc
137
145
- name : install Chrome stable
138
146
run : |
139
147
sudo apt-get update
140
148
sudo apt-get install google-chrome-stable
141
- - uses : actions/checkout@v4
142
- - uses : actions/setup-node@v4
143
- with :
144
- node-version-file : ' .nvmrc'
145
149
- name : Download build archive
146
- uses : actions/download-artifact@v4
150
+ uses : actions/download-artifact@v3
147
151
with :
148
- name : build-changed-firestore-${{ github.sha }}
152
+ name : build-${{ github.sha }}
153
+ - name : Unzip build artifact
154
+ run : tar xf build.tar.gz
149
155
- name : Test setup against nightly Firestore
150
156
env :
151
157
INTEG_TESTS_GOOGLE_SERVICES : ${{ secrets.FIRESTORE_SDK_NIGHTLY_PROJECT_JSON }}
@@ -170,14 +176,17 @@ jobs:
170
176
run : |
171
177
sudo apt-get update
172
178
sudo apt-get install firefox
173
- - uses : actions/checkout@v4
174
179
- uses : actions/setup-node@v4
175
180
with :
176
- node-version-file : ' .nvmrc'
181
+ node-version-file : .nvmrc
177
182
- name : Download build archive
178
- uses : actions/download-artifact@v4
183
+ uses : actions/download-artifact@v3
179
184
with :
180
- name : build-changed-firestore-${{ github.sha }}
185
+ name : build-${{ github.sha }}
186
+ - name : Unzip build artifact
187
+ run : tar xf build.tar.gz
188
+ - name : Test setup and yarn install
189
+ run : cp config/ci.config.json config/project.json
181
190
- name : Run compat tests
182
191
run : cd packages/firestore-compat && xvfb-run yarn run test:ci
183
192
env :
@@ -200,12 +209,16 @@ jobs:
200
209
sudo apt-get update
201
210
sudo apt-get install firefox
202
211
- name : Download build archive
203
- uses : actions/download-artifact@v4
212
+ uses : actions/download-artifact@v3
204
213
with :
205
- name : build-changed-firestore-${{ github.sha }}
214
+ name : build-${{ github.sha }}
215
+ - name : Unzip build artifact
216
+ run : tar xf build.tar.gz
206
217
- uses : actions/setup-node@v4
207
218
with :
208
- node-version-file : ' .nvmrc'
219
+ node-version-file : .nvmrc
220
+ - name : Test setup and yarn install
221
+ run : cp config/ci.config.json config/project.json
209
222
- name : Run tests
210
223
run : cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }}
211
224
env :
@@ -220,12 +233,17 @@ jobs:
220
233
steps :
221
234
- uses : actions/setup-node@v4
222
235
with :
223
- node-version-file : ' .nvmrc'
236
+ node-version-file : .nvmrc
224
237
- name : Download build archive
225
- uses : actions/download-artifact@v4
238
+ uses : actions/download-artifact@v3
226
239
with :
227
- name : build-changed-firestore-${{ github.sha }}
228
- - run : npx playwright install webkit
240
+ name : build-${{ github.sha }}
241
+ - name : Unzip build artifact
242
+ run : tar xf build.tar.gz
243
+ - name : Test setup
244
+ run : |
245
+ cp config/ci.config.json config/project.json
246
+ npx playwright install webkit
229
247
- name : Run compat tests
230
248
run : cd packages/firestore-compat && yarn run test:ci
231
249
env :
@@ -243,16 +261,19 @@ jobs:
243
261
needs : build
244
262
if : ${{ needs.build.outputs.changed == 'true'}}
245
263
steps :
246
- - uses : actions/checkout@v4
247
264
- name : Download build archive
248
- uses : actions/download-artifact@v4
265
+ uses : actions/download-artifact@v3
249
266
with :
250
- name : build-changed-firestore-${{ github.sha }}
267
+ name : build-${{ github.sha }}
268
+ - name : Unzip build artifact
269
+ run : tar xf build.tar.gz
251
270
- uses : actions/setup-node@v4
252
271
with :
253
- node-version-file : ' .nvmrc'
254
- - run : cp config/ci.config.json config/project.json
255
- - run : npx playwright install webkit
272
+ node-version-file : .nvmrc
273
+ - name : Test setup
274
+ run : |
275
+ cp config/ci.config.json config/project.json
276
+ npx playwright install webkit
256
277
- name : Run tests
257
278
run : cd packages/firestore && yarn run ${{ matrix.test-name }}
258
279
env :
0 commit comments