From 4b2d3289b9f173726e116c1682d8e05eec16d2e1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 20 Jun 2026 04:09:26 +0000 Subject: [PATCH] ci: run e2e tests on pull requests Co-authored-by: Amruth Pillai --- .github/workflows/e2e.yml | 79 +++++++++++++++++++++++++++++++++++++++ tests/e2e/README.md | 27 +++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 .github/workflows/e2e.yml create mode 100644 tests/e2e/README.md diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..b8979f44f --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,79 @@ +name: E2E Tests + +on: + pull_request: + push: + branches: ["main"] + +permissions: + contents: read + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + APP_URL: http://localhost:3000 + PORT: "3000" + DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres + AUTH_SECRET: e2e-test-secret + FLAG_DISABLE_SIGNUPS: "false" + FLAG_DISABLE_EMAIL_AUTH: "false" + FLAG_DISABLE_API_RATE_LIMIT: "true" + LOCAL_STORAGE_PATH: /tmp/reactive-resume-e2e-storage + +jobs: + e2e: + runs-on: ubuntu-latest + timeout-minutes: 30 + + services: + postgres: + image: postgres:latest + env: + POSTGRES_DB: postgres + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U postgres -d postgres" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - name: Checkout Repository + uses: actions/checkout@v6 + + - name: Install pnpm + uses: pnpm/action-setup@v6 + + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version: "24" + cache: "pnpm" + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Install Playwright Browser + run: pnpm exec playwright install --with-deps chromium + + - name: Prepare Storage + run: mkdir -p "$LOCAL_STORAGE_PATH" + + - name: Build + run: pnpm build + + - name: Run E2E Tests + run: pnpm test:e2e:ci + + - name: Upload Playwright Report + if: always() + uses: actions/upload-artifact@v7 + with: + name: playwright-report + path: | + playwright-report + test-results + if-no-files-found: ignore + retention-days: 7 diff --git a/tests/e2e/README.md b/tests/e2e/README.md new file mode 100644 index 000000000..30f0ff8f5 --- /dev/null +++ b/tests/e2e/README.md @@ -0,0 +1,27 @@ +# E2E Tests + +Reactive Resume uses Playwright for PR-gated browser coverage of deterministic core flows. + +## Local setup + +Start PostgreSQL: + +`sudo docker compose -f compose.dev.yml up -d postgres` + +Build the production app: + +`APP_URL=http://localhost:3000 PORT=3000 DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres AUTH_SECRET=e2e-test-secret FLAG_DISABLE_SIGNUPS=false FLAG_DISABLE_EMAIL_AUTH=false FLAG_DISABLE_API_RATE_LIMIT=true LOCAL_STORAGE_PATH=/workspace/data/e2e pnpm build` + +Run tests: + +`APP_URL=http://localhost:3000 PORT=3000 DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres AUTH_SECRET=e2e-test-secret FLAG_DISABLE_SIGNUPS=false FLAG_DISABLE_EMAIL_AUTH=false FLAG_DISABLE_API_RATE_LIMIT=true LOCAL_STORAGE_PATH=/workspace/data/e2e pnpm test:e2e` + +## Coverage + +- Email/password auth smoke. +- Dashboard sample resume creation. +- Builder basics edit and autosave persistence. +- JSON export/import. +- Public sharing for anonymous visitors. + +PDF, DOCX, OAuth, passkeys, 2FA, password reset, and AI flows are intentionally outside the initial PR gate.