Skip to content

fix(e2e): stop the invitation seed requiring .env.local in CI - #224

Merged
stewartjarod merged 2 commits into
mainfrom
fix/e2e-invitation-seed-ci
Oct 28, 2026
Merged

stewartjarod merged 2 commits into
mainfrom
fix/e2e-invitation-seed-ci

Conversation

@stewartjarod

Copy link
Copy Markdown
Contributor

Problem

E2E is red on every PR and on main. The run aborts at collection with no tests executed:

failed to collect tests/invitation.e2e.ts: ENOENT: no such file or directory, open '../web/.env.local'

tests/invitation-seed.ts (added in 7be242e) read ../web/.env.local at module load. CI has no .env.local, so importing the file threw. 95dcd40 then enabled e2e on PRs and main, which surfaced it everywhere.

Fix

Resolve DATABASE_URL lazily inside seedInvitation, with the same precedence as e2e.config.ts: .env.local when it exists (local runs), otherwise the DATABASE_URL CI passes in.

Verification

  • tsc --noEmit and Biome clean.
  • Importing the module with no ../web/.env.local present now succeeds (previously threw the ENOENT above).
  • The run aborted at collection, so a later failure could be hiding behind this one; this PR's own E2E run is the real check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GxJAQSAJjD1Aip2CJVF6P3

invitation-seed.ts read ../web/.env.local at module load, so collecting
invitation.e2e.ts threw ENOENT on CI runners (which have no .env.local) and
aborted every e2e run with no tests executed. Resolve DATABASE_URL lazily with
the same precedence as e2e.config.ts: .env.local when present, else the
DATABASE_URL CI passes in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxJAQSAJjD1Aip2CJVF6P3
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
wraps-web Skipped Skipped Oct 28, 2026 6:56pm UTC
wraps-website Skipped Skipped Oct 28, 2026 6:56pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – wraps-web October 28, 2026 18:48 Inactive
@vercel
vercel Bot temporarily deployed to Preview – wraps-website October 28, 2026 18:48 Inactive
The runner gives the app process only PATH, HOME and the inheritEnv/env
entries, so CI never reaches it. pnpm's pre-run dependency check then tried to
reinstall and aborted with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY, and the
target failed with APP_UNREACHABLE before any test ran. The job has already
run pnpm install --frozen-lockfile, so launch next's bin and skip pnpm.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxJAQSAJjD1Aip2CJVF6P3
@vercel
vercel Bot temporarily deployed to Preview – wraps-web October 28, 2026 18:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – wraps-website October 28, 2026 18:56 Inactive
@stewartjarod
stewartjarod merged commit bf89678 into main Oct 28, 2026
20 checks passed
@stewartjarod
stewartjarod deleted the fix/e2e-invitation-seed-ci branch October 28, 2026 19:12

This branch was previously deployed

2 inactive deployments
Preview – wraps-website — 81bb33fa Deployed Oct 28, 2026 by vercel[bot]
Preview – wraps-web — 81bb33fa Deployed Oct 28, 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.

1 participant