Skip to content

Commit 8048634

Browse files
committed
move artifacts job before tests
1 parent 8035b14 commit 8048634

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,40 @@ jobs:
168168
- name: Run madge
169169
run: yarn circularDepCheck
170170

171+
job_artifacts:
172+
name: Upload Artifacts
173+
needs: job_build
174+
runs-on: ubuntu-latest
175+
# Build artifacts are only needed for releasing workflow.
176+
if: startsWith(github.ref, 'refs/heads/release/')
177+
steps:
178+
- name: Check out current commit (${{ github.sha }})
179+
uses: actions/checkout@v2
180+
- name: Set up Node
181+
uses: actions/setup-node@v1
182+
- name: Check dependency cache
183+
uses: actions/cache@v2
184+
with:
185+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
186+
key: ${{ needs.job_build.outputs.dependency_cache_key }}
187+
- name: Check build cache
188+
uses: actions/cache@v2
189+
with:
190+
path: ${{ env.CACHED_BUILD_PATHS }}
191+
key: ${{ env.BUILD_CACHE_KEY }}
192+
- name: Pack
193+
run: yarn build:npm
194+
- name: Archive artifacts
195+
uses: actions/upload-artifact@v2
196+
with:
197+
name: ${{ github.sha }}
198+
path: |
199+
${{ github.workspace }}/packages/browser/build/bundles/**
200+
${{ github.workspace }}/packages/integrations/build/**
201+
${{ github.workspace }}/packages/tracing/build/**
202+
${{ github.workspace }}/packages/**/*.tgz
203+
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip
204+
171205
job_unit_test:
172206
name: Test (Node ${{ matrix.node }})
173207
needs: job_build
@@ -274,40 +308,6 @@ jobs:
274308
- name: Compute test coverage
275309
uses: codecov/codecov-action@v1
276310

277-
job_artifacts:
278-
name: Upload Artifacts
279-
needs: job_build
280-
runs-on: ubuntu-latest
281-
# Build artifacts are only needed for releasing workflow.
282-
if: startsWith(github.ref, 'refs/heads/release/')
283-
steps:
284-
- name: Check out current commit (${{ github.sha }})
285-
uses: actions/checkout@v2
286-
- name: Set up Node
287-
uses: actions/setup-node@v1
288-
- name: Check dependency cache
289-
uses: actions/cache@v2
290-
with:
291-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
292-
key: ${{ needs.job_build.outputs.dependency_cache_key }}
293-
- name: Check build cache
294-
uses: actions/cache@v2
295-
with:
296-
path: ${{ env.CACHED_BUILD_PATHS }}
297-
key: ${{ env.BUILD_CACHE_KEY }}
298-
- name: Pack
299-
run: yarn build:npm
300-
- name: Archive artifacts
301-
uses: actions/upload-artifact@v2
302-
with:
303-
name: ${{ github.sha }}
304-
path: |
305-
${{ github.workspace }}/packages/browser/build/bundles/**
306-
${{ github.workspace }}/packages/integrations/build/**
307-
${{ github.workspace }}/packages/tracing/build/**
308-
${{ github.workspace }}/packages/**/*.tgz
309-
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip
310-
311311
job_browser_playwright_tests:
312312
name: Browser Playwright Tests (${{ matrix.bundle }} - tracing_only = ${{ matrix.tracing_only }})
313313
needs: job_build

0 commit comments

Comments
 (0)