Repository navigation
fix(e2e): stop the invitation seed requiring .env.local in CI - #224
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
E2E is red on every PR and on main. The run aborts at collection with no tests executed:
tests/invitation-seed.ts(added in 7be242e) read../web/.env.localat 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_URLlazily insideseedInvitation, with the same precedence ase2e.config.ts:.env.localwhen it exists (local runs), otherwise theDATABASE_URLCI passes in.Verification
tsc --noEmitand Biome clean.../web/.env.localpresent now succeeds (previously threw the ENOENT above).🤖 Generated with Claude Code
https://claude.ai/code/session_01GxJAQSAJjD1Aip2CJVF6P3