Skip to content

Commit

Permalink
Merge branch 'main' into gh-eng-954-add-sentry-to-bunlder-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Feb 20, 2024
2 parents 0dd83ef + aa4ffc3 commit 48e19a8
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,70 @@ jobs:
- name: Run e2e tests
run: pnpm run test:e2e --maxWorkers=2

upload-stats-data-to-staging:
upload-build-stats-production:
name: Build and upload ${{ matrix.example }} stats data to production
runs-on: ubuntu-latest
needs: [install, unit-test, integration-test]
strategy:
fail-fast: false
matrix:
example: ["next-js", "rollup", "vite", "webpack"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-codecov-js-bundle-plugin-node-modules
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Install dependencies
run: pnpm install

- name: Build plugins
run: pnpm run build

- name: Install built plugins
run: pnpm install

- name: Build ${{ matrix.example }} app for staging
working-directory: ./examples/${{ matrix.example }}
env:
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
NEXT_API_URL: ${{ secrets.CODECOV_API_URL }}
ROLLUP_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
ROLLUP_API_URL: ${{ secrets.CODECOV_API_URL }}
VITE_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
VITE_API_URL: ${{ secrets.CODECOV_API_URL }}
WEBPACK_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
WEBPACK_API_URL: ${{ secrets.CODECOV_API_URL }}
run: pnpm run build

upload-build-stats-staging:
name: Build and upload ${{ matrix.example }} stats data to staging
runs-on: ubuntu-latest
needs: [install, unit-test, integration-test]
Expand Down Expand Up @@ -335,7 +398,7 @@ jobs:
- name: Install built plugins
run: pnpm install

- name: Build ${{ matrix.example }} app
- name: Build ${{ matrix.example }} app for staging
working-directory: ./examples/${{ matrix.example }}
env:
NEXT_UPLOAD_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
Expand Down

0 comments on commit 48e19a8

Please sign in to comment.