Skip to content

Commit 03ae324

Browse files
committed
change test-changed-firestore to only archive dist
1 parent c78802e commit 03ae324

File tree

1 file changed

+57
-40
lines changed

1 file changed

+57
-40
lines changed

.github/workflows/test-changed-firestore.yml

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,14 @@ jobs:
7070
if: steps.check-changed.outcome != 'success'
7171
id: set-output
7272
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
7873
- name: Upload build archive
7974
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.check-changed.outcome != 'success' }}
80-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
8176
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
8481
retention-days: ${{ env.artifactRetentionDays }}
8582

8683
compat-test-chrome:
@@ -107,11 +104,9 @@ jobs:
107104
sudo apt-get update
108105
sudo apt-get install google-chrome-stable
109106
- name: Download build archive
110-
uses: actions/download-artifact@v3
107+
uses: actions/download-artifact@v4
111108
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 }}
115110
- run: cp config/ci.config.json config/project.json
116111
- name: Run compat tests
117112
run: cd packages/firestore-compat && yarn run test:ci
@@ -143,11 +138,9 @@ jobs:
143138
sudo apt-get update
144139
sudo apt-get install google-chrome-stable
145140
- name: Download build archive
146-
uses: actions/download-artifact@v3
141+
uses: actions/download-artifact@v4
147142
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 }}
151144
- run: cp config/ci.config.json config/project.json
152145
- name: Run tests
153146
run: cd packages/firestore && yarn run ${{ matrix.test-name }}
@@ -169,16 +162,21 @@ jobs:
169162
node-version-file: '.nvmrc'
170163
cache: yarn
171164
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
172172
- name: install Chrome stable
173173
run: |
174174
sudo apt-get update
175175
sudo apt-get install google-chrome-stable
176176
- name: Download build archive
177-
uses: actions/download-artifact@v3
177+
uses: actions/download-artifact@v4
178178
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 }}
182180
- name: Test setup against nightly Firestore
183181
env:
184182
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.FIRESTORE_SDK_NIGHTLY_PROJECT_JSON }}
@@ -209,12 +207,17 @@ jobs:
209207
node-version-file: '.nvmrc'
210208
cache: yarn
211209
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
212217
- name: Download build archive
213-
uses: actions/download-artifact@v3
218+
uses: actions/download-artifact@v4
214219
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 }}
218221
- run: cp config/ci.config.json config/project.json
219222
- name: Run compat tests
220223
run: cd packages/firestore-compat && xvfb-run yarn run test:ci
@@ -238,17 +241,22 @@ jobs:
238241
sudo apt-get update
239242
sudo apt-get install firefox
240243
- name: Download build archive
241-
uses: actions/download-artifact@v3
244+
uses: actions/download-artifact@v4
242245
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 }}
246247
- uses: actions/checkout@v4
247248
- uses: actions/setup-node@v4
248249
with:
249250
node-version-file: '.nvmrc'
250251
cache: yarn
251252
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
252260
- run: cp config/ci.config.json config/project.json
253261
- name: Run tests
254262
run: cd packages/firestore && xvfb-run yarn run ${{ matrix.test-name }}
@@ -268,15 +276,19 @@ jobs:
268276
node-version-file: '.nvmrc'
269277
cache: yarn
270278
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
271286
- name: Download build archive
272-
uses: actions/download-artifact@v3
287+
uses: actions/download-artifact@v4
273288
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
280292
- name: Run compat tests
281293
run: cd packages/firestore-compat && yarn run test:ci
282294
env:
@@ -294,18 +306,23 @@ jobs:
294306
needs: build
295307
if: ${{ needs.build.outputs.changed == 'true'}}
296308
steps:
309+
- uses: actions/checkout@v4
297310
- name: Download build archive
298-
uses: actions/download-artifact@v3
311+
uses: actions/download-artifact@v4
299312
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 }}
304314
- uses: actions/setup-node@v4
305315
with:
306316
node-version-file: '.nvmrc'
307317
cache: yarn
308318
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
309326
- run: cp config/ci.config.json config/project.json
310327
- run: npx playwright install webkit
311328
- name: Run tests

0 commit comments

Comments
 (0)