Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,45 @@ jobs:
# Build gate — hermetic (Prisma calls fall back without a live DB, see header).
- name: Build
run: npm run build

# The vote spine against a real database: migration replay on a fresh
# postgres (proves the baseline + seed actually apply), then the
# propose → open → vote → close → policy-activation integration spec.
integration:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: ci
POSTGRES_PASSWORD: ci
POSTGRES_DB: ci
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U ci"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgres://ci:ci@localhost:5432/ci
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v7
with:
node-version: 20
cache: npm

- name: Install
run: npm ci

- name: Prisma generate
run: npx prisma generate

- name: Migration replay (baseline + seed on a fresh database)
run: npx prisma migrate deploy

- name: Vote spine integration spec
run: INTEGRATION=1 npx vitest run src/lib/domain/__tests__/vote-spine.integration.test.ts
Loading