Repository navigation
ci(repo): scope integration test inputs to packages the e2e apps use #38491
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 | |
| on: | |
| merge_group: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| - release/v4 | |
| - release/core-2 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Check triggering actor permissions to prevent PRs from forks accessing secrets by default, preventing them from exfiltrating secrets for malicious purposes | |
| check-permissions: | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| name: Check Permissions | |
| steps: | |
| - name: Skip permission check for same‑repo PRs | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| run: echo "Permission check not required." | |
| - name: Get User Permission | |
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} | |
| id: checkAccess | |
| uses: actions-cool/check-user-permission@v2.4.0 | |
| with: | |
| require: write | |
| username: ${{ github.triggering_actor }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check User Permission | |
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && steps.checkAccess.outputs.require-result == 'false' }} | |
| run: | | |
| echo "${{ github.triggering_actor }} does not have permissions on this repo." | |
| echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | |
| echo "Job originally triggered by ${{ github.actor }}" | |
| exit 1 | |
| pre-checks: | |
| needs: [check-permissions] | |
| name: Formatting | Dedupe | Changeset | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 5 }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 100 # Enough for changeset status comparison, much faster than full history | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Fetch main branch for changeset comparison | |
| run: git fetch origin main:refs/remotes/origin/main --depth=100 | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Verify lockfile is deduped | |
| run: pnpm dedupe --check | |
| - name: Check Formatting | |
| run: pnpm format:check | |
| - name: Check Dashboard links | |
| run: pnpm lint:dashboard-links | |
| - name: Verify localizations are generated | |
| run: | | |
| pnpm --filter @clerk/localizations generate | |
| if ! git diff --quiet -- packages/localizations/src; then | |
| echo "::error::Localization files are out of date. Run 'pnpm --filter @clerk/localizations generate' and commit the result." | |
| git --no-pager diff -- packages/localizations/src | |
| exit 1 | |
| fi | |
| - name: Require Changeset | |
| if: ${{ github.event_name != 'merge_group' && github.event.pull_request.draft == false }} | |
| run: | | |
| if [[ "${{ github.event.pull_request.user.login }}" = "clerk-cookie" || "${{ github.event.pull_request.user.login }}" = "renovate[bot]" ]]; then | |
| echo 'Skipping'; | |
| exit 0; | |
| else | |
| pnpm changeset status --since=origin/main; | |
| fi | |
| expo-native-runner-tests: | |
| needs: [check-permissions] | |
| name: Expo Native Runner Tests | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 5 }} | |
| env: | |
| PACKAGE: integration/expo-native | |
| WATCHED: >- | |
| integration/expo-native | |
| .github/workflows/ci.yml | |
| .github/workflows/verify-remote.yml | |
| .github/actionlint.yaml | |
| integration/templates/expo-native | |
| packages/expo | |
| packages/expo-biometrics | |
| packages/expo-google-signin | |
| packages/expo-native-components | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 2 # The pull request merge commit and its parents, to see what the PR changes | |
| fetch-tags: false | |
| show-progress: false | |
| - name: Check whether the package changed | |
| id: changed | |
| env: | |
| EVENT: ${{ github.event_name }} | |
| run: | | |
| if [ "$EVENT" != "pull_request" ] || ! git diff --quiet HEAD^1 HEAD -- $WATCHED; then | |
| echo "package=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Setup Node | |
| if: steps.changed.outputs.package == 'true' | |
| uses: actions/setup-node@v4.4.0 | |
| with: | |
| node-version: 24.15.0 | |
| - name: Install the package's own dependencies | |
| if: steps.changed.outputs.package == 'true' | |
| run: npm ci --prefix "$PACKAGE" | |
| - name: Run the package's unit tests | |
| if: steps.changed.outputs.package == 'true' | |
| run: npm test --prefix "$PACKAGE" | |
| - name: Typecheck the package | |
| if: steps.changed.outputs.package == 'true' | |
| run: npm run typecheck --prefix "$PACKAGE" | |
| build-packages: | |
| needs: [check-permissions] | |
| name: Build Packages | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }} | |
| env: | |
| TURBO_SUMMARIZE: false | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-summarize: ${{ env.TURBO_SUMMARIZE }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Turbo Build | |
| run: pnpm turbo build $TURBO_ARGS --only | |
| - name: Upload Turbo Summary | |
| uses: actions/upload-artifact@v4.6.2 | |
| if: ${{ env.TURBO_SUMMARIZE == 'true' }} | |
| continue-on-error: true | |
| with: | |
| name: turbo-summary-report-build-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: .turbo/runs | |
| retention-days: 5 | |
| bundle-size: | |
| needs: [check-permissions, build-packages] | |
| name: Bundle size | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| # No continue-on-error: an over-budget chunk fails this job, which is the gate. | |
| # Enforcement rides on this job's exit code, not the `bundlewatch` commit status | |
| # (which collides across packages and can be masked by a sibling's pass). | |
| - name: Check size using bundlewatch | |
| env: | |
| BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} | |
| CI_BRANCH: ${{ github.ref }} | |
| CI_BRANCH_BASE: refs/heads/main | |
| CI_COMMIT_SHA: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_sha || github.event.pull_request.head.sha }} | |
| CI_REPO_NAME: ${{ vars.REPO_NAME }} | |
| CI_REPO_OWNER: ${{ vars.REPO_OWNER }} | |
| run: pnpm turbo bundlewatch $TURBO_ARGS | |
| static-analysis: | |
| needs: [check-permissions, build-packages] | |
| name: Static analysis | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }} | |
| env: | |
| TURBO_SUMMARIZE: false | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-summarize: ${{ env.TURBO_SUMMARIZE }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Lint packages using publint | |
| run: pnpm turbo lint:publint $TURBO_ARGS | |
| - name: Lint types using attw | |
| run: pnpm turbo lint:attw $TURBO_ARGS | |
| - name: Run lint | |
| run: pnpm turbo lint $TURBO_ARGS | |
| - name: Upload Turbo Summary | |
| uses: actions/upload-artifact@v4.6.2 | |
| if: ${{ env.TURBO_SUMMARIZE == 'true' }} | |
| continue-on-error: true | |
| with: | |
| name: turbo-summary-report-lint-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: .turbo/runs | |
| retention-days: 5 | |
| unit-tests: | |
| needs: [check-permissions, build-packages] | |
| name: Unit Tests (${{ matrix.filter-label }}) | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }} | |
| env: | |
| TURBO_SUMMARIZE: false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - node-version: 24.15.0 | |
| test-filter: '**' | |
| filter-label: '**' | |
| - node-version: 20.19.0 | |
| test-filter: '**' | |
| filter-label: '**' | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Fetch Expo native release tags | |
| run: | | |
| git fetch --depth=1 --no-tags origin \ | |
| 'refs/tags/@clerk/expo-native-components@*:refs/tags/@clerk/expo-native-components@*' \ | |
| 'refs/tags/@clerk/expo-google-signin@*:refs/tags/@clerk/expo-google-signin@*' \ | |
| 'refs/tags/@clerk/expo-biometrics@*:refs/tags/@clerk/expo-biometrics@*' | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| # Ensures that all builds are cached appropriately with a consistent run name `Unit Tests (20)`. | |
| node-version: ${{ matrix.node-version }} | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-summarize: ${{ env.TURBO_SUMMARIZE }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Run tests in packages | |
| run: | | |
| TURBO_ARGS=$(sed -E 's/--concurrency=[0-9]+/--concurrency=1/' <<< "$TURBO_ARGS") | |
| if [ "${{ matrix.test-filter }}" = "**" ]; then | |
| echo "Running full test suite on Node ${{ matrix.node-version }}" | |
| pnpm turbo test $TURBO_ARGS | |
| else | |
| echo "Running tests: ${{ matrix.filter-label }}" | |
| pnpm turbo test $TURBO_ARGS ${{ matrix.test-filter }} | |
| fi | |
| env: | |
| NODE_VERSION: ${{ matrix.node-version }} | |
| - name: Run Typedoc tests | |
| run: | | |
| # Only run Typedoc tests for one matrix version and main test run | |
| if [ "${{ matrix.node-version }}" == "24.15.0" ] && [ "${{ matrix.test-filter }}" = "**" ]; then | |
| pnpm turbo run //#test:typedoc | |
| fi | |
| env: | |
| NODE_VERSION: ${{ matrix.node-version }} | |
| - name: Run CI script tests | |
| if: matrix.node-version == '24.15.0' | |
| run: pnpm vitest run --root scripts verify-attach verify-flaky run-integration integration-deps | |
| - name: Upload Turbo Summary | |
| uses: actions/upload-artifact@v4.6.2 | |
| if: ${{ env.TURBO_SUMMARIZE == 'true' }} | |
| continue-on-error: true | |
| with: | |
| name: turbo-summary-report-unit-${{ github.run_id }}-${{ github.run_attempt }}-node-${{ matrix.node-version }} | |
| path: .turbo/runs | |
| retention-days: 5 | |
| mosaic-feature-tests: | |
| needs: [check-permissions, build-packages] | |
| name: Mosaic Feature Tests | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| playwright-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Build Mosaic and its dependencies | |
| run: pnpm turbo build $TURBO_ARGS --filter=@clerk/mosaic... | |
| - name: Run feature tests | |
| run: pnpm --filter @clerk/mosaic test:feature | |
| - name: Run browser tests | |
| run: pnpm --filter @clerk/mosaic test:browser | |
| - name: Upload failure artifacts | |
| if: ${{ cancelled() || failure() }} | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: mosaic-feature-failure-artifacts-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: packages/mosaic/.vitest/attachments | |
| retention-days: 1 | |
| if-no-files-found: ignore | |
| mosaic-visual-tests: | |
| needs: [check-permissions, build-packages] | |
| name: Mosaic Visual Tests | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Build Mosaic and its dependencies | |
| run: pnpm turbo build $TURBO_ARGS --filter=@clerk/mosaic... | |
| - name: Run visual tests | |
| id: visual | |
| run: | | |
| status=0 | |
| bash packages/mosaic/scripts/test-visual.sh compare || status=$? | |
| if [[ "$status" -ne 0 ]] && find packages/mosaic/.vitest/attachments -name '*.png' -print -quit 2>/dev/null | grep -q .; then | |
| echo "differences=true" >> "$GITHUB_OUTPUT" | |
| elif [[ "$status" -ne 0 ]]; then | |
| exit "$status" | |
| fi | |
| - name: Report visual differences | |
| if: ${{ steps.visual.outputs.differences == 'true' }} | |
| run: | | |
| echo "::warning title=Mosaic visual differences::Screenshots differ from baselines. Download mosaic-visual-failure-artifacts-${{ github.run_id }}-${{ github.run_attempt }} to review." | |
| echo "### Mosaic screenshots differ from baselines" >> "$GITHUB_STEP_SUMMARY" | |
| find packages/mosaic/.vitest/attachments -name '*.png' -printf '- %P\n' >> "$GITHUB_STEP_SUMMARY" || true | |
| - name: Upload failure artifacts | |
| if: ${{ steps.visual.outputs.differences == 'true' }} | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: mosaic-visual-failure-artifacts-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: | | |
| packages/mosaic/.vitest/attachments | |
| packages/mosaic/src/**/__screenshots__/**/*-chromium-linux.png | |
| include-hidden-files: true | |
| retention-days: 7 | |
| if-no-files-found: warn | |
| integration-tests: | |
| needs: [check-permissions, build-packages] | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| name: Integration Tests (${{ matrix.test-name }}, ${{ matrix.test-project }}${{ matrix.next-version && format(', {0}', matrix.next-version) || '' }}) | |
| permissions: | |
| contents: read | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: ${{ vars.TIMEOUT_MINUTES_LONG && fromJSON(vars.TIMEOUT_MINUTES_LONG) || 15 }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-name: | |
| [ | |
| 'generic', | |
| 'express', | |
| 'fastify', | |
| 'ap-flows', | |
| 'localhost', | |
| 'sessions', | |
| 'sessions:staging', | |
| 'handshake', | |
| 'handshake:staging', | |
| 'astro', | |
| 'tanstack-react-start', | |
| 'vue', | |
| 'nuxt', | |
| 'react-router', | |
| 'custom', | |
| 'hono', | |
| 'chrome-extension', | |
| 'electron', | |
| ] | |
| test-project: ['chrome'] | |
| include: | |
| - test-name: 'billing' | |
| test-project: 'chrome' | |
| - test-name: 'machine' | |
| test-project: 'chrome' | |
| - test-name: 'nextjs' | |
| test-project: 'chrome' | |
| next-version: '15' | |
| - test-name: 'nextjs' | |
| test-project: 'chrome' | |
| next-version: '16' | |
| - test-name: 'quickstart' | |
| test-project: 'chrome' | |
| next-version: '15' | |
| - test-name: 'quickstart' | |
| test-project: 'chrome' | |
| next-version: '16' | |
| - test-name: 'cache-components' | |
| test-project: 'chrome' | |
| next-version: '16' | |
| - test-name: 'mosaic' | |
| test-project: 'chrome' | |
| next-version: '16' | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup | |
| id: config | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| playwright-enabled: true | |
| playwright-install-enabled: false | |
| - name: Validate turbo task | |
| run: | | |
| TASK_NAME="test:integration:${{ matrix.test-name }}" | |
| node -e 'const pkg = require("./package.json"); const turbo = require("./turbo.json"); const name = process.argv[1]; if (!pkg.scripts[name] || !turbo.tasks["//#" + name]) process.exit(1)' "$TASK_NAME" | |
| - name: Edit .npmrc [link-workspace-packages=false] | |
| run: sed -i -E 's/link-workspace-packages=(deep|true)/link-workspace-packages=false/' .npmrc | |
| - name: Write all ENV certificates to files in integration/certs | |
| uses: actions/github-script@v7.1.0 | |
| env: | |
| INTEGRATION_CERTS: '${{secrets.INTEGRATION_CERTS}}' | |
| INTEGRATION_ROOT_CA: '${{secrets.INTEGRATION_ROOT_CA}}' | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const rootCa = process.env.INTEGRATION_ROOT_CA; | |
| console.log('rootCa', rootCa); | |
| fs.writeFileSync(path.join(process.env.GITHUB_WORKSPACE, 'integration/certs', 'rootCA.pem'), rootCa); | |
| const certs = JSON.parse(process.env.INTEGRATION_CERTS); | |
| for (const [name, cert] of Object.entries(certs)) { | |
| fs.writeFileSync(path.join(process.env.GITHUB_WORKSPACE, 'integration/certs', name), cert); | |
| } | |
| - name: Configure test user cleanup | |
| run: echo "INTEGRATION_TEST_RUN_KEY=${RUN_ID}-${RUN_ATTEMPT}-${TEST_NAME}-${TEST_PROJECT}-${NEXT_VERSION:-default}" >> "$GITHUB_ENV" | |
| env: | |
| RUN_ID: ${{ github.run_id }} | |
| RUN_ATTEMPT: ${{ github.run_attempt }} | |
| TEST_NAME: ${{ matrix.test-name }} | |
| TEST_PROJECT: ${{ matrix.test-project }} | |
| NEXT_VERSION: ${{ matrix.next-version }} | |
| - name: Run Integration Tests | |
| id: integration-tests | |
| timeout-minutes: 25 | |
| run: pnpm turbo test:integration:${{ matrix.test-name }} $TURBO_ARGS | |
| env: | |
| TURBO_FORCE: ${{ github.event_name == 'merge_group' }} | |
| E2E_CI_SETUP: ${{ matrix.test-name }} | |
| CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET: ${{ secrets.CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET }} | |
| CLERK_PLATFORM_API_KEY: ${{ secrets.CLERK_PLATFORM_API_KEY }} | |
| E2E_DEBUG: '1' | |
| E2E_APP_CLERK_JS_DIR: ${{runner.temp}} | |
| E2E_APP_CLERK_UI_DIR: ${{runner.temp}} | |
| E2E_CLERK_JS_VERSION: 'latest' | |
| E2E_CLERK_UI_VERSION: 'latest' | |
| E2E_NEXTJS_VERSION: ${{ matrix.next-version }} | |
| E2E_PROJECT: ${{ matrix.test-project }} | |
| INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }} | |
| NODE_EXTRA_CA_CERTS: ${{ github.workspace }}/integration/certs/rootCA.pem | |
| VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }} | |
| - name: Sanitize artifact name | |
| if: ${{ cancelled() || failure() }} | |
| id: sanitize | |
| run: | | |
| SANITIZED="${TEST_NAME//:/-}" | |
| echo "artifact-suffix=${SANITIZED}" >> $GITHUB_OUTPUT | |
| env: | |
| TEST_NAME: ${{ matrix.test-name }} | |
| - name: Upload test-results | |
| if: ${{ cancelled() || failure() }} | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: playwright-traces-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.sanitize.outputs.artifact-suffix }}${{ matrix.next-version && format('-next{0}', matrix.next-version) || '' }} | |
| path: integration/test-results | |
| retention-days: 1 | |
| - name: Delete integration-test users | |
| if: ${{ always() && steps.integration-tests.outputs.tests-started == 'true' }} | |
| timeout-minutes: 10 | |
| run: pnpm test:integration:cleanup | |
| env: | |
| CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET: ${{ secrets.CLERK_E2E_OAUTH_PROVIDER_CLIENT_SECRET }} | |
| CLERK_PLATFORM_API_KEY: ${{ secrets.CLERK_PLATFORM_API_KEY }} | |
| INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }} | |
| NODE_EXTRA_CA_CERTS: ${{ github.workspace }}/integration/certs/rootCA.pem | |
| pkg-pr-new: | |
| name: Publish with pkg-pr-new | |
| needs: [check-permissions, build-packages] | |
| runs-on: 'blacksmith-8vcpu-ubuntu-2204' | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| TURBO_SUMMARIZE: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4.4.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| fetch-tags: false | |
| filter: 'blob:none' | |
| show-progress: false | |
| - name: Setup Node | |
| uses: $/.github/actions/init-blacksmith | |
| with: | |
| cache-enabled: true | |
| turbo-enabled: true | |
| node-version: 24.15.0 | |
| turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | |
| turbo-summarize: ${{ env.TURBO_SUMMARIZE }} | |
| turbo-team: ${{ vars.TURBO_TEAM }} | |
| turbo-token: ${{ secrets.TURBO_TOKEN }} | |
| - name: Publish with pkg-pr-new | |
| run: pnpm run build && pnpx pkg-pr-new@${{ vars.PKG_PR_NEW_VERSION || '0.0.93' }} publish --compact --pnpm './packages/*' |