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