- .github/workflows/ci.yml: format check, typecheck (including tests) and all unit tests with the provisioner tests; PostgreSQL migrations applied twice (the second run must find nothing) plus the PostgreSQL integration tests; IDE gateway, collaboration and policy tests against the IDE package's dependencies. - runtime.Dockerfile gains web (Next.js production build) and provisioner (kubectl from an operator-supplied image) targets; tool images default to scratch so only the targets that need them fail without them. - apps/ide/Dockerfile takes reviewed Node images as arguments and adds a slim gateway target. - The Kubernetes provisioner also deletes a stopped generation's capability secrets, service accounts and network policy; volumes stay for diagnosis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
name: Format, types and tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run format:check
|
|
- run: npm run typecheck
|
|
# Unit and in-process integration tests (including the local main loop) and the provisioner tests.
|
|
- run: npm test
|
|
|
|
postgres:
|
|
name: PostgreSQL migrations and integration tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
services:
|
|
postgres:
|
|
image: postgres:17.6
|
|
env:
|
|
POSTGRES_USER: wishforge
|
|
POSTGRES_PASSWORD: wishforge-ci-only
|
|
POSTGRES_DB: wishforge
|
|
ports: ['5432:5432']
|
|
options: >-
|
|
--health-cmd "pg_isready -U wishforge -d wishforge"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 20
|
|
env:
|
|
WF_DEPLOYMENT_MODE: development
|
|
DATABASE_ADMIN_URL: postgresql://wishforge:wishforge-ci-only@127.0.0.1:5432/wishforge
|
|
WF_DATABASE_APP_PASSWORD: wishforge-app-ci-password
|
|
DATABASE_URL: postgresql://wishforge_app:wishforge-app-ci-password@127.0.0.1:5432/wishforge
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run db:migrate
|
|
# A second run must find nothing to apply (requirements FR-K2).
|
|
- run: npm run db:migrate | tee migrate.log && grep -q 'up to date' migrate.log
|
|
- run: npm run test:integration
|
|
|
|
ide:
|
|
name: IDE gateway, collaboration and policy tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: apps/ide/package-lock.json
|
|
# The Theia application itself is not built here; these tests need only its dependencies.
|
|
- run: npm ci --prefix apps/ide --ignore-scripts
|
|
- run: npm run test:ide
|