mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-11 06:11:15 +00:00
Turbopack cannot resolve imports from src/generated/prisma even with relative paths and committed files. Switch to --webpack for CI build. Also add file verification step for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
1.5 KiB
YAML
65 lines
1.5 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: Generate Prisma client
|
|
run: npx prisma generate
|
|
|
|
- name: Run database migrations
|
|
run: npx prisma migrate deploy
|
|
|
|
- name: Verify generated files exist
|
|
run: |
|
|
echo "=== src/generated/prisma contents ==="
|
|
ls -la src/generated/prisma/
|
|
echo "=== index.ts content ==="
|
|
cat src/generated/prisma/index.ts
|
|
echo "=== client.ts first 3 lines ==="
|
|
head -3 src/generated/prisma/client.ts
|
|
|
|
- name: Build (includes type check and lint)
|
|
run: npx next build --webpack
|
|
env:
|
|
AUTH_SECRET: ci-test-secret-not-for-production
|
|
AUTH_TRUST_HOST: "true"
|
|
NEXT_PUBLIC_APP_URL: http://localhost:3000
|