Files
buildfor_life_ops/.github/workflows/validate.yml
T
grabowski 3274afb677
Validate / validate (push) Successful in 29s
Deploy to LXC / deploy (push) Failing after 2m27s
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>
2026-04-27 11:11:47 +07:00

39 lines
1.1 KiB
YAML

name: Validate
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: pnpm
- name: Install dependencies
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