Skip to content

Stabilize CI E2E by running against production server - #2

Merged
ShubhJain09 merged 11 commits into
mainfrom
copilot/fix-github-actions-job
Sep 26, 2026
Merged

ShubhJain09 merged 11 commits into
mainfrom
copilot/fix-github-actions-job

Conversation

Copilot AI commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

The failing Actions job was in the Playwright signup flow. CI was exercising E2E against next dev, which introduced cold-start/HMR instability and broke the expected signup → verify path.

  • CI runtime

    • Switch the workflow’s E2E phase to run against the built app via npm run start instead of next dev.
    • Keep the existing build step as the source of truth for the server E2E runs against.
  • Signup verification behavior in CI

    • Extract localVerificationEnabled() for the local-mail verification path.
    • Allow local verification tokens during CI production-mode runs only when:
      • ECHO_LOCAL_MAIL=true
      • storage is non-AWS
      • CI=true
    • Reuse that gate both for the email-delivery guard and the signup response payload.
  • Regression coverage

    • Add isolated integration coverage for the signup API path under CI production-mode settings.
    • Move the child-process route check into a dedicated fixture for readability and maintenance.
  • Test DB bootstrap

    • Replace duplicated ad hoc schema setup with a shared helper that boots auth test databases through the repo’s existing SQLite prep + Prisma migration path.
export function localVerificationEnabled() {
  return (
    process.env.ECHO_LOCAL_MAIL === 'true' &&
    process.env.ECHO_STORAGE !== 'aws' &&
    (process.env.NODE_ENV !== 'production' || process.env.CI === 'true')
  );
}

@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
echo-knowledge-decay Ready Ready Preview Sep 20, 2026 6:36pm UTC

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: bd39fa95-1e8f-4eb6-a129-623713562a56

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Co-authored-by: ShubhJain09 <323014600+ShubhJain09@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Stabilize CI E2E by running against production server Sep 20, 2026
Copilot AI requested a review from ShubhJain09 September 20, 2026 18:38
@ShubhJain09
ShubhJain09 requested a lite review from Copilot and removed request for Copilot September 25, 2026 09:54
@ShubhJain09
ShubhJain09 marked this pull request as ready for review September 25, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The route-type reference can break clean CI typechecking, and signup coverage needs boundary cases and deterministic NEXTAUTH_URL.

Review effort: Lite
Findings: None

What changed in this PR

Stabilizes CI E2E by running the built production server and adds controlled CI signup verification coverage.

Changes:

  • Runs E2E against npm run start.
  • Centralizes local verification gating.
  • Adds signup regression coverage and shared Prisma migration setup.
File Summary
echo/​tests/​integration/​fixtures/​apply-prisma-migrations.ts Shared SQLite migration setup.
echo/​tests/​integration/​fixtures/​account-signup-ci-check.ts Isolated signup route fixture.
echo/​tests/​integration/​accounts.test.ts Uses shared database initialization.
echo/​tests/​integration/​account-signup-ci.test.ts Tests CI production-mode signup.
echo/​next-env.d.ts References production route types.
echo/​lib/​auth/​accounts.ts Adds local verification gating.
echo/​echo.db SQLite database artifact.
echo/​app/​api/​account/​[action]/​route.ts Applies verification gating to signup.
.github/​workflows/​ci.yml Runs E2E against the production server.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ShubhJain09
ShubhJain09 merged commit e1cfc09 into main Sep 26, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 66ba58f4 Deployed Sep 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants