Remove user from a process #1230
Workflow file for this run
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: E2E Tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: E2E Tests (shard ${{ matrix.shard }}/2) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2] | |
| env: | |
| # Tiptap Pro registry authentication | |
| TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }} | |
| # E2E Supabase instance environment variables (port 56xxx) | |
| NEXT_PUBLIC_SUPABASE_URL: http://127.0.0.1:56321 | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | |
| SUPABASE_URL: http://127.0.0.1:56321 | |
| SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | |
| SUPABASE_SERVICE_ROLE: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU | |
| DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:56322/postgres | |
| S3_ASSET_ROOT: http://127.0.0.1:56321/storage/v1/object/public/assets | |
| NEXT_PUBLIC_POSTHOG_KEY: phc_test_key_for_ci | |
| # SSR secrets for cookie encryption (CI-specific key) | |
| SSR_SECRETS_KEY: '{"alg":"A256CBC","ext":true,"k":"ClrCwvDCjk5wvgqFbotuW5PU4z35GL_nz5U7wXUrqTA","key_ops":["encrypt","decrypt"],"kty":"oct"}' | |
| # Resend (email - stub) | |
| RESEND_PASSWORD: re_test_key_for_ci | |
| # Google OAuth (stub values - not used in E2E tests) | |
| SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID: test-client-id.apps.googleusercontent.com | |
| SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_SECRET: test-client-secret | |
| # TipTap Cloud (collaborative editing - stub for tests) | |
| NEXT_PUBLIC_TIPTAP_APP_ID: test-tiptap-app-id | |
| # Centrifugo (realtime - stub values for tests) | |
| CENTRIFUGO_API_URL: http://localhost:8000/api | |
| CENTRIFUGO_API_KEY: test_api_key | |
| CENTRIFUGO_TOKEN_SECRET: test_token_secret | |
| NEXT_PUBLIC_CENTRIFUGO_WS_URL: ws://localhost:8000/connection/websocket | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install pnpm | |
| run: corepack prepare pnpm@latest --activate | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Get Playwright version | |
| id: playwright-version | |
| run: | | |
| PLAYWRIGHT_VERSION=$(pnpm -C ./tests/e2e exec playwright --version | head -n1 | awk '{print $2}') | |
| echo "version=${PLAYWRIGHT_VERSION}" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm -C ./tests/e2e exec playwright install --with-deps chromium | |
| - name: Install Playwright system dependencies | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: pnpm -C ./tests/e2e exec playwright install-deps chromium | |
| - name: Setup Supabase CLI | |
| uses: supabase/setup-cli@v1 | |
| with: | |
| version: 2.71.0 # Pinned: v2.71.1+ breaks auth.admin.deleteUser() in test cleanup | |
| - name: Use E2E Supabase config | |
| run: cp supabase/supabase-e2e.toml supabase/config.toml | |
| - name: Start Supabase (E2E instance) | |
| run: | | |
| echo "Starting Supabase with E2E config (ports 56xxx)..." | |
| supabase start | |
| echo "Supabase E2E instance started successfully" | |
| - name: Check Supabase status | |
| run: supabase status | |
| - name: Run database migrations | |
| run: pnpm w:db migrate:e2e | |
| - name: Seed test database | |
| run: pnpm w:db seed:e2e | |
| - name: Run E2E tests | |
| run: pnpm -C ./tests/e2e exec playwright test --shard=${{ matrix.shard }}/2 --reporter=blob | |
| - name: Upload Playwright blob report | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ always() && !cancelled() }} | |
| with: | |
| name: blob-report-${{ matrix.shard }} | |
| path: tests/e2e/blob-report/ | |
| retention-days: 7 | |
| merge-reports: | |
| name: Merge Playwright Reports | |
| runs-on: ubuntu-latest | |
| needs: e2e | |
| if: ${{ always() && !cancelled() }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install pnpm | |
| run: corepack prepare pnpm@latest --activate | |
| - name: Download blob reports | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: all-blob-reports | |
| pattern: blob-report-* | |
| merge-multiple: true | |
| - name: Merge into HTML report | |
| working-directory: tests/e2e | |
| run: pnpm dlx playwright@1.58.0 merge-reports --reporter html ../../all-blob-reports | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: tests/e2e/playwright-report/ | |
| retention-days: 30 |