Files
iios/.github/workflows/ci.yml
T
kirti 23f5159521
CI / build (push) Failing after 1m30s
ci: unquoted --health-cmd so the Postgres service is wired to the job
A quoted '--health-cmd "pg_isready -U iios"' in the folded options scalar
splits on spaces, so docker received an invalid healthcheck command; the
service never went healthy and the job container couldn't resolve postgres:5432
(P1001). Match go-monorepo's proven unquoted '--health-cmd pg_isready'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 15:21:58 +00:00

60 lines
2.1 KiB
YAML

name: CI
on:
pull_request:
push:
branches: [main, develop]
jobs:
build:
runs-on: dind-builder
# Clean Ubuntu with Node tooling; proven on this runner (matches go-monorepo CI).
# A job container is required so the `services:` Postgres is reachable by its
# service name (`postgres`) on the shared job network.
container:
image: catthehacker/ubuntu:act-latest
# pgvector Postgres for the DB-backed *.spec.ts integration suites. The specs
# read DATABASE_URL (set below) and fall back to localhost:5434 for local
# `docker compose` dev; in CI they connect to this service at postgres:5432.
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: iios
POSTGRES_PASSWORD: iios
POSTGRES_DB: iios
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql://iios:iios@postgres:5432/iios?schema=public
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm boundary
# iios-service uses Prisma: generate the client so its generated types
# (schema enums, Prisma.InputJsonValue) are available for typecheck/build.
- run: pnpm --filter @insignia/iios-service prisma:generate
# Build before typecheck: the @insignia/* workspace packages publish their
# types via built dist/*.d.ts, so consumers (iios-kernel-client, etc.)
# can only resolve them once dist exists. Typechecking first fails with
# TS2307 "Cannot find module '@insignia/iios-contracts'".
- run: pnpm -r build
- run: pnpm -r typecheck
# Apply the schema to the CI Postgres before the DB-backed specs run
# (reset-db.ts TRUNCATEs existing tables; migrations must exist first).
- run: pnpm --filter @insignia/iios-service exec prisma migrate deploy
- run: pnpm test