CI: Canary Tests #1440
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'CI: Canary Tests' | |
| on: | |
| schedule: | |
| # Run every day at midnight | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| commit: | |
| description: If the commit you want to test isn't the head of a branch, provide its SHA here | |
| required: false | |
| env: | |
| HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }} | |
| CACHED_BUILD_PATHS: | | |
| ${{ github.workspace }}/packages/*/*.tgz | |
| ${{ github.workspace }}/node_modules | |
| ${{ github.workspace }}/packages/*/node_modules | |
| ${{ github.workspace }}/dev-packages/*/node_modules | |
| ${{ github.workspace }}/dev-packages/*/build | |
| ${{ github.workspace }}/packages/*/build | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| job_e2e_prepare: | |
| name: Prepare E2E Canary tests | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out current commit | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ env.HEAD_COMMIT }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: 'package.json' | |
| - name: Check canary cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.CACHED_BUILD_PATHS }} | |
| key: canary-${{ env.HEAD_COMMIT }} | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build packages | |
| run: yarn build | |
| - name: Build tarballs | |
| run: yarn build:tarball | |
| job_e2e_tests: | |
| name: E2E ${{ matrix.label }} Test | |
| needs: [job_e2e_prepare] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| env: | |
| # We just use a dummy DSN here, only send to the tunnel anyhow | |
| E2E_TEST_DSN: 'https://username@domain/123' | |
| # Needed because some apps expect a certain prefix | |
| NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123' | |
| PUBLIC_E2E_TEST_DSN: 'https://username@domain/123' | |
| REACT_APP_E2E_TEST_DSN: 'https://username@domain/123' | |
| E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks' | |
| E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - test-application: 'angular-21' | |
| build-command: 'test:build-canary' | |
| label: 'angular-21 (next)' | |
| - test-application: 'create-react-app' | |
| build-command: 'test:build-canary' | |
| label: 'create-react-app (canary)' | |
| - test-application: 'nextjs-app-dir' | |
| build-command: 'test:build-15' | |
| label: 'nextjs-app-dir (next@15)' | |
| - test-application: 'nextjs-13' | |
| build-command: 'test:build-latest' | |
| label: 'nextjs-13 (latest)' | |
| - test-application: 'nextjs-14' | |
| build-command: 'test:build-canary' | |
| label: 'nextjs-14 (canary)' | |
| - test-application: 'nextjs-14' | |
| build-command: 'test:build-latest' | |
| label: 'nextjs-14 (latest)' | |
| - test-application: 'nextjs-15' | |
| build-command: 'test:build-latest' | |
| label: 'nextjs-15 (latest)' | |
| - test-application: 'nextjs-16' | |
| build-command: 'test:build-canary' | |
| label: 'nextjs-16 (canary)' | |
| - test-application: 'nextjs-16' | |
| build-command: 'test:build-canary-webpack' | |
| label: 'nextjs-16 (canary-webpack)' | |
| - test-application: 'react-create-hash-router' | |
| build-command: 'test:build-canary' | |
| label: 'react-create-hash-router (canary)' | |
| - test-application: 'react-router-6' | |
| build-command: 'test:build-canary' | |
| label: 'react-router-6 (canary)' | |
| - test-application: 'nuxt-3' | |
| build-command: 'test:build-canary' | |
| label: 'nuxt-3 (canary)' | |
| - test-application: 'nuxt-4' | |
| build-command: 'test:build-canary' | |
| label: 'nuxt-4 (canary)' | |
| - test-application: 'tanstackstart-react' | |
| build-command: 'test:build-latest' | |
| label: 'tanstackstart-react (latest)' | |
| - test-application: 'nestjs-11' | |
| build-command: 'test:build-latest' | |
| label: 'nestjs-11 (latest)' | |
| - test-application: 'nestjs-websockets' | |
| build-command: 'test:build-latest' | |
| label: 'nestjs-websockets (latest)' | |
| - test-application: 'nestjs-microservices' | |
| build-command: 'test:build-latest' | |
| label: 'nestjs-microservices (latest)' | |
| steps: | |
| - name: Check out current commit | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ env.HEAD_COMMIT }} | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.9 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: 'dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json' | |
| - name: Restore canary cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ env.CACHED_BUILD_PATHS }} | |
| key: canary-${{ env.HEAD_COMMIT }} | |
| - name: Prepare e2e tests | |
| run: yarn test:prepare | |
| working-directory: dev-packages/e2e-tests | |
| - name: Validate test setup | |
| run: yarn test:validate | |
| working-directory: dev-packages/e2e-tests | |
| - name: Copy to temp | |
| run: yarn ci:copy-to-temp ./test-applications/${{ matrix.test-application }} ${{ runner.temp }}/test-application | |
| working-directory: dev-packages/e2e-tests | |
| - name: Add pnpm overrides | |
| run: | |
| yarn ci:pnpm-overrides ${{ runner.temp }}/test-application ${{ github.workspace | |
| }}/dev-packages/e2e-tests/packed | |
| working-directory: dev-packages/e2e-tests | |
| - name: Build E2E app | |
| working-directory: ${{ runner.temp }}/test-application | |
| timeout-minutes: 7 | |
| run: yarn ${{ matrix.build-command }} | |
| - name: Install Playwright | |
| uses: ./.github/actions/install-playwright | |
| with: | |
| browsers: chromium | |
| cwd: ${{ runner.temp }}/test-application | |
| - name: Run E2E test | |
| working-directory: ${{ runner.temp }}/test-application | |
| timeout-minutes: 15 | |
| run: yarn test:assert | |
| - name: Create Issue | |
| if: failure() && github.event_name == 'schedule' | |
| uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| TITLE: ${{ matrix.label }} Test Failed | |
| with: | |
| filename: .github/CANARY_FAILURE_TEMPLATE.md | |
| update_existing: true |