Repository navigation
96 lines (80 loc) · 2.98 KB
/
Copy pathci.yml
File metadata and controls
96 lines (80 loc) · 2.98 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
# ── Servicio postgres comentado temporalmente ──────────────────────────
# Backend en normalización/refactorización. Re-habilitar cuando las
# migraciones sean estables.
#
# services:
# postgres:
# image: postgres:16
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: devurity_ci
# ports:
# - 5432:5432
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
env:
# DATABASE_URL comentado — no hay servicio postgres activo
# DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/devurity_ci?schema=public"
DATABASE_URL: "postgresql://placeholder:placeholder@localhost:5432/placeholder?schema=public"
JWT_SECRET: ${{ secrets.JWT_SECRET || 'ci-only-not-a-real-secret' }}
NEXT_PUBLIC_APP_URL: "https://devurityweb.vercel.app"
NEXT_PUBLIC_API_URL: "https://devurityweb.vercel.app"
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.22.1
cache: pnpm
# Cache para el cliente de Prisma generado
- name: Cache Prisma generated client
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: lib/generated/prisma
key: prisma-${{ hashFiles('prisma/schema.prisma') }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Esencial: genera tipos @prisma/client para que TypeScript compile sin errores
- name: Generate Prisma Client
run: pnpm exec prisma generate
# ── Steps de BD comentados temporalmente ──────────────────────────────
# Re-habilitar junto con el servicio postgres cuando el schema esté estable.
#
# - name: Apply DB migrations
# run: pnpm run db:migrate
#
# - name: Repair DB sequences
# run: pnpm run db:repair
#
# - name: Seed database
# run: pnpm run db:seed
# Barrera principal: detecta errores de tipos sin necesidad de DB
- name: TypeScript check
run: pnpm exec tsc --noEmit
- name: Run Tests
run: pnpm run test
- name: Lint
run: pnpm run lint
# Verifica estabilidad de rutas App Router y Layouts de Next.js
- name: Build
run: pnpm run build