ci(validate): stub required env vars so build-time analyse passes
src/lib/server/env.ts validates DATABASE_URL, SESSION_SECRET, STORAGE_SIGNING_SECRET, and PUBLIC_BASE_URL with Zod and throws when missing. SvelteKit's analyse step imports it during build, so CI needs values that satisfy the schema shape — they never connect to anything. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,4 +28,11 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run validation (svelte-check + build)
|
||||
# Stub env so the build-time analyse step can import src/lib/server/env.ts
|
||||
# without connecting to anything. Values match the Zod schema's shape only.
|
||||
env:
|
||||
DATABASE_URL: postgres://ci:ci@localhost:5432/ci
|
||||
SESSION_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
|
||||
STORAGE_SIGNING_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
|
||||
PUBLIC_BASE_URL: http://localhost:5173
|
||||
run: pnpm run validate
|
||||
|
||||
Reference in New Issue
Block a user