Files
xCyanGrizzly 46cb517b8d fix: use standard @prisma/client imports instead of custom output path
The custom generator output to src/generated/prisma caused persistent
Turbopack module resolution failures in CI. Switch to the standard
@prisma/client import path which all bundlers resolve correctly.

- Remove custom output from prisma schema generator
- Update all imports from ../generated/prisma to @prisma/client
- Add postinstall script to auto-run prisma generate after npm ci
- Remove generated files from git (no longer needed in source tree)
- Simplify CI workflow (remove verify step and --webpack workaround)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-18 19:49:53 +01:00

53 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
DATABASE_URL: postgresql://dragons:stash@localhost:5432/dragonsstash
jobs:
lint-and-build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: dragons
POSTGRES_PASSWORD: stash
POSTGRES_DB: dragonsstash
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U dragons -d dragonsstash"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run database migrations
run: npx prisma migrate deploy
- name: Build (includes type check and lint)
run: npm run build
env:
AUTH_SECRET: ci-test-secret-not-for-production
AUTH_TRUST_HOST: "true"
NEXT_PUBLIC_APP_URL: http://localhost:3000