-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.59 KB
/
Copy pathbackend-checks.yml
File metadata and controls
61 lines (53 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Backend Checks
on:
pull_request:
paths:
- 'backend/**'
- '.github/workflows/backend-checks.yml'
push:
branches: [main]
paths:
- 'backend/**'
jobs:
backend-checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- name: Install dependencies
working-directory: backend
run: npm ci --ignore-scripts
- name: Build backend (generates schemas)
working-directory: backend
run: npm run build
env:
# Use test database for build
DATABASE_URL: file:./test.db
SESSION_SECRET: test-secret-for-ci-checks-only-min-32-chars
- name: Verify schema generation
working-directory: backend
env:
DATABASE_URL: file:./test.db
run: |
if [ -f schema.prisma ]; then
echo "✓ Prisma schema generated successfully"
npx prisma validate
echo ""
echo "Schema preview (first 50 lines):"
cat schema.prisma | head -50
else
echo "✗ Prisma schema not generated"
exit 1
fi
- name: TypeScript type check (informational)
working-directory: backend
# Continue on error - admin UI may have type issues but Keystone builds fine
continue-on-error: true
run: npm run typecheck