Repository navigation
refactor(composition): one wiring file per context, the root only fixes the order #2801
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Simulation | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Superseded runs of this workflow are cancelled so they stop competing for | |
| # runners with the commit that replaced them. main is never cancelled: its runs | |
| # gate the release. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| simulate: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| # BQC-7.7: digest-pinned (multi-arch index) — tag comment for humans. | |
| image: postgres:16@sha256:33f923b05f64ca54ac4401c01126a6b92afe839a0aa0a52bc5aeb5cc958e5f20 # 16.14 | |
| env: | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_DB: test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| # version intentionally unset: package.json packageManager (pnpm@10.6.5) is the single source | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Push database schema | |
| env: | |
| NODE_ENV: test | |
| DATABASE_URL: postgresql://test:test@localhost:5432/test | |
| BETTER_AUTH_SECRET: test-secret-at-least-32-characters-long-for-ci | |
| BETTER_AUTH_URL: http://localhost:3000 | |
| GOOGLE_CLIENT_ID: ci-placeholder-client-id | |
| GOOGLE_CLIENT_SECRET: ci-placeholder-client-secret | |
| ENCRYPTION_KEY: aabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd | |
| OAUTH_STATE_SECRET: aabbccddaabbccddaabbccddaabbccdd | |
| # Ephemeral simulation DB: auth track FIRST because the journal's | |
| # DB-only constructs reference auth-owned tables, then the Drizzle | |
| # journal. Identical sequence to ci.yml and deploy (BQC-5.4). | |
| run: | | |
| pnpm auth:migrate | |
| pnpm db:migrate | |
| - name: Run simulation with invariant checks | |
| env: | |
| NODE_ENV: test | |
| DATABASE_URL: postgresql://test:test@localhost:5432/test | |
| BETTER_AUTH_SECRET: test-secret-at-least-32-characters-long-for-ci | |
| BETTER_AUTH_URL: http://localhost:3000 | |
| RESEND_API_KEY: re_ci_test_key_placeholder | |
| GOOGLE_CLIENT_ID: ci-placeholder-client-id | |
| GOOGLE_CLIENT_SECRET: ci-placeholder-client-secret | |
| ENCRYPTION_KEY: aabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd | |
| OAUTH_STATE_SECRET: aabbccddaabbccddaabbccddaabbccdd | |
| run: pnpm seed -- --org=sim-ci-org --invariants | |
| timeout-minutes: 5 |