@@ -37,23 +37,17 @@ jobs:
3737 with :
3838 # This makes Actions fetch all Git history so run-changed script can diff properly.
3939 fetch-depth : 0
40+ - uses : actions/setup-node@v4
41+ with :
42+ node-version-file : .nvmrc
4043 - name : install Chrome stable
4144 run : |
4245 sudo apt-get update
4346 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
5751 - name : build
5852 id : build
5953 run : |
@@ -70,12 +64,17 @@ jobs:
7064 if : steps.check-changed.outcome != 'success'
7165 id : set-output
7266 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
7372 - name : Upload build archive
7473 if : ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
7574 uses : actions/upload-artifact@v4
7675 with :
77- name : build-changed-firestore- ${{ github.sha }}
78- path : .
76+ name : build-${{ github.sha }}
77+ path : build.tar.gz
7978 retention-days : ${{ env.artifactRetentionDays }}
8079
8180 compat-test-chrome :
@@ -84,18 +83,21 @@ jobs:
8483 needs : build
8584 if : ${{ needs.build.outputs.changed == 'true'}}
8685 steps :
86+ - uses : actions/setup-node@v4
87+ with :
88+ node-version-file : .nvmrc
8789 - name : install Chrome stable
8890 run : |
8991 sudo apt-get update
9092 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'
9593 - name : Download build archive
96- uses : actions/download-artifact@v4
94+ uses : actions/download-artifact@v3
9795 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
99101 - name : Run compat tests
100102 run : cd packages/firestore-compat && yarn run test:ci
101103
@@ -108,18 +110,21 @@ jobs:
108110 needs : build
109111 if : ${{ needs.build.outputs.changed == 'true'}}
110112 steps :
113+ - uses : actions/setup-node@v4
114+ with :
115+ node-version-file : .nvmrc
111116 - name : install Chrome stable
112117 run : |
113118 sudo apt-get update
114119 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'
119120 - name : Download build archive
120- uses : actions/download-artifact@v4
121+ uses : actions/download-artifact@v3
121122 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
123128 - name : Run tests
124129 run : cd packages/firestore && yarn run ${{ matrix.test-name }}
125130 env :
@@ -134,18 +139,19 @@ jobs:
134139 needs : build
135140 if : ${{ github.event_name != 'pull_request' }}
136141 steps :
142+ - uses : actions/setup-node@v4
143+ with :
144+ node-version-file : .nvmrc
137145 - name : install Chrome stable
138146 run : |
139147 sudo apt-get update
140148 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'
145149 - name : Download build archive
146- uses : actions/download-artifact@v4
150+ uses : actions/download-artifact@v3
147151 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
149155 - name : Test setup against nightly Firestore
150156 env :
151157 INTEG_TESTS_GOOGLE_SERVICES : ${{ secrets.FIRESTORE_SDK_NIGHTLY_PROJECT_JSON }}
@@ -170,14 +176,17 @@ jobs:
170176 run : |
171177 sudo apt-get update
172178 sudo apt-get install firefox
173- - uses : actions/checkout@v4
174179 - uses : actions/setup-node@v4
175180 with :
176- node-version-file : ' .nvmrc'
181+ node-version-file : .nvmrc
177182 - name : Download build archive
178- uses : actions/download-artifact@v4
183+ uses : actions/download-artifact@v3
179184 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
181190 - name : Run compat tests
182191 run : cd packages/firestore-compat && xvfb-run yarn run test:ci
183192 env :
@@ -200,12 +209,16 @@ jobs:
200209 sudo apt-get update
201210 sudo apt-get install firefox
202211 - name : Download build archive
203- uses : actions/download-artifact@v4
212+ uses : actions/download-artifact@v3
204213 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
206217 - uses : actions/setup-node@v4
207218 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
209222 - name : Run tests
210223 run : cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }}
211224 env :
@@ -220,12 +233,17 @@ jobs:
220233 steps :
221234 - uses : actions/setup-node@v4
222235 with :
223- node-version-file : ' .nvmrc'
236+ node-version-file : .nvmrc
224237 - name : Download build archive
225- uses : actions/download-artifact@v4
238+ uses : actions/download-artifact@v3
226239 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
229247 - name : Run compat tests
230248 run : cd packages/firestore-compat && yarn run test:ci
231249 env :
@@ -243,16 +261,19 @@ jobs:
243261 needs : build
244262 if : ${{ needs.build.outputs.changed == 'true'}}
245263 steps :
246- - uses : actions/checkout@v4
247264 - name : Download build archive
248- uses : actions/download-artifact@v4
265+ uses : actions/download-artifact@v3
249266 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
251270 - uses : actions/setup-node@v4
252271 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
256277 - name : Run tests
257278 run : cd packages/firestore && yarn run ${{ matrix.test-name }}
258279 env :
0 commit comments