Skip to content

Commit 48e19a8

Browse files
authored
Merge branch 'main' into gh-eng-954-add-sentry-to-bunlder-plugins
2 parents 0dd83ef + aa4ffc3 commit 48e19a8

File tree

1 file changed

+65
-2
lines changed

1 file changed

+65
-2
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,70 @@ jobs:
285285
- name: Run e2e tests
286286
run: pnpm run test:e2e --maxWorkers=2
287287

288-
upload-stats-data-to-staging:
288+
upload-build-stats-production:
289+
name: Build and upload ${{ matrix.example }} stats data to production
290+
runs-on: ubuntu-latest
291+
needs: [install, unit-test, integration-test]
292+
strategy:
293+
fail-fast: false
294+
matrix:
295+
example: ["next-js", "rollup", "vite", "webpack"]
296+
steps:
297+
- name: Checkout
298+
uses: actions/checkout@v4
299+
with:
300+
fetch-depth: 0
301+
302+
- name: Setup node
303+
uses: actions/setup-node@v3
304+
with:
305+
node-version: 18
306+
307+
- name: Install pnpm
308+
uses: pnpm/action-setup@v2
309+
with:
310+
version: 8
311+
run_install: false
312+
313+
- name: Get pnpm store directory
314+
shell: bash
315+
run: |
316+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
317+
318+
- name: Cache node_modules
319+
id: cache-node-modules
320+
uses: actions/cache@v3
321+
env:
322+
cache-name: cache-codecov-js-bundle-plugin-node-modules
323+
with:
324+
path: ${{ env.STORE_PATH }}
325+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
326+
restore-keys: |
327+
${{ runner.os }}-${{ env.cache-name }}-
328+
329+
- name: Install dependencies
330+
run: pnpm install
331+
332+
- name: Build plugins
333+
run: pnpm run build
334+
335+
- name: Install built plugins
336+
run: pnpm install
337+
338+
- name: Build ${{ matrix.example }} app for staging
339+
working-directory: ./examples/${{ matrix.example }}
340+
env:
341+
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
342+
NEXT_API_URL: ${{ secrets.CODECOV_API_URL }}
343+
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
344+
ROLLUP_API_URL: ${{ secrets.CODECOV_API_URL }}
345+
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
346+
VITE_API_URL: ${{ secrets.CODECOV_API_URL }}
347+
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
348+
WEBPACK_API_URL: ${{ secrets.CODECOV_API_URL }}
349+
run: pnpm run build
350+
351+
upload-build-stats-staging:
289352
name: Build and upload ${{ matrix.example }} stats data to staging
290353
runs-on: ubuntu-latest
291354
needs: [install, unit-test, integration-test]
@@ -335,7 +398,7 @@ jobs:
335398
- name: Install built plugins
336399
run: pnpm install
337400

338-
- name: Build ${{ matrix.example }} app
401+
- name: Build ${{ matrix.example }} app for staging
339402
working-directory: ./examples/${{ matrix.example }}
340403
env:
341404
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}

0 commit comments

Comments
 (0)