Skip to content

Playwright smoke suite GitHub Actions secrets

Secrets must be added before the first CI run

Applies to: Playwright smoke tests (.github/workflows/playwright-smoke.yml), which inherit secrets from preview and production workflows via secrets: inherit

Critical: GitHub Actions secrets for the Playwright smoke suite must be configured on the repository before the workflow's first execution. PR #812 merged while its own CI was red due to a missing secret error — the workflow proceeded despite the failure because the secret validation happened deep in the test setup phase, not as an early CI guard step.

If any of the required secrets below are missing, the Run Playwright Smoke step will fail late in the job, after setup and dependency installation. The new Verify required secrets step (added in task OBJ-560) fast-fails immediately when a secret is absent, with a clear message naming which secret is missing and the fix location (Settings → Secrets and variables → Actions).

Required secrets

The following secrets must be defined in the GitHub repository (Settings → Secrets and variables → Actions):

  1. CLERK_SECRET_KEY — Clerk backend secret key for API calls (required for auth setup)
  2. FALLBACK_AUTH_SECRET — Secret for the fallback auth flow (required for sign-in fallback tests)
  3. SMOKE_CLERK_EMAIL — Email address of a +clerk_test staging user (required for Clerk sign-in)
  4. SMOKE_FALLBACK_EMAIL — Email address for fallback auth testing (required for fallback flow)
  5. ACHIEVEMENTS_EMPTY_EMAIL — Test user email with no achievements (required for achievement tests)
  6. ACHIEVEMENTS_POPULATED_EMAIL — Test user email with achievements already earned (required for achievement tests)

All six secrets are consumed by the Run Playwright Smoke step in .github/workflows/playwright-smoke.yml (lines 134–139).

How to add secrets

  1. Navigate to the repository: Settings → Secrets and variables → Actions
  2. Click New repository secret for each missing secret
  3. Enter the secret name (exactly as listed above) and its value
  4. Save

The Verify required secrets step (OBJ-560) will now fast-fail during the next CI run if any secret is missing, displaying which one is absent.

Staging user setup (SMOKE_CLERK_EMAIL)

The smoke suite requires a Clerk user tagged with +clerk_test in the staging Clerk instance. The auth setup (ionic_frontend/tests/smoke-playwright/setup/auth.staging.setup.ts, line 34–36) throws if SMOKE_CLERK_EMAIL is missing:

typescript
const clerkEmail = process.env.SMOKE_CLERK_EMAIL
if (!clerkEmail) {
  throw new Error('SMOKE_CLERK_EMAIL is required for the staging setup project (a +clerk_test staging Clerk user)')
}
  • .github/workflows/playwright-smoke.yml — workflow consuming all six secrets
  • .github/workflows/preview.yml lines 87–95 — smoke tests invoked on every PR with secrets: inherit
  • ionic_frontend/tests/smoke-playwright/setup/auth.staging.setup.ts — auth setup with secret validation
  • OBJ-560 — adds the Verify required secrets early-fail step

Last updated: 2026-07-21

Loading…