@startuml cicd-pipeline !include _style.iuml scale max 1850 width title 1. Pipeline CI/CD — ExpressMX |Developer| start :commit local en feature branch; :push y abre Pull Request contra main; |GitHub Actions| note right Trigger: push a main o pull_request hacia main. Tres jobs en paralelo bajo ubuntu-latest, Node 20, pnpm 9.15.0 con cache. end note fork partition "job: quality" { :checkout + setup pnpm/node; :pnpm install --frozen-lockfile; :pnpm turbo run typecheck lint; note right env: TURBO_TELEMETRY_DISABLED=1 end note } fork again partition "job: test" { :levanta service postgres:16 (POSTGRES_DB=expressmx_test); :checkout + setup pnpm/node; :pnpm install --frozen-lockfile; :psql -f 00.sql + migrations/*.sql; :pnpm turbo run test; note right DATABASE_URL=postgresql://test:test@localhost:5432 JWT_SECRET=ci-test-secret-min-32-chars-long-enough NODE_ENV=test end note } fork again partition "job: build (needs quality)" { :checkout + setup pnpm/node; :pnpm install --frozen-lockfile; :pnpm turbo run build; note right DATABASE_URL=postgresql://placeholder JWT_SECRET=build-time-placeholder-min-32-chars end note } end fork partition "job: e2e (if: false — future)" { :psql + migrations al servicio postgres; :pnpm db:seed (admin determinista, pendiente); :pnpm --filter @expressmx/web e2e:install; :pnpm --filter @expressmx/web e2e; :upload-artifact playwright-report; note right Activación futura cuando exista seed reproducible. Variables: E2E_ADMIN_AVAILABLE, E2E_ADMIN_EMAIL, E2E_ADMIN_PASSWORD. end note } if (¿checks verdes?) then (sí) :merge a main vía squash; else (no) :PR bloqueado, autor corrige; stop endif |Vercel| :detecta push a main; :build production con DATABASE_URL production; :deploy automático a dominio expressmx.app; |Neon| note right Lifecycle de branches Postgres asociado a cada PR. end note :on PR open: neonctl branches create --parent production --name preview/pr-; :inyecta DATABASE_URL preview en el deployment de Vercel; :on PR merge/close: neonctl branches delete preview/pr-; |Expo EAS| note right Release opcional manual para apps móviles. end note :eas build --platform all (release de cliente o prestador); :eas submit a App Store y Play Store; stop footer Fuente: .github/workflows/ci.yml, turbo.json, pnpm-workspace.yaml, docs/architecture/neon-branching.md @enduml