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