-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (73 loc) · 2.48 KB
/
Copy pathci.yml
File metadata and controls
85 lines (73 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Golden CI floor — see bitbaum/fleet templates/ci/README.md.
# solon: npm + Drizzle. Floor = verify (lint + typecheck + design:check + test) + build.
# Lint is `eslint .` — Next 16 removed `next lint`, and ESLint 9 wants flat
# config, so the rules live in eslint.config.mjs (eslint-config-next already
# exports a flat array). `.eslintrc.json` is gone.
# `next build` is hermetic: the server components that touch the database catch
# errors and render demo fallbacks, so no live DB is needed. Drizzle has no
# codegen at all — types flow from src/lib/db/schema.ts at typecheck time.
# The Playwright e2e smoke tests stay deferred (need a running app).
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DATABASE_URL: postgres://ci:ci@localhost:5432/ci
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install
run: npm ci
# SSOT: lint + typecheck, defined in package.json `verify`.
- name: Verify
run: npm run verify
# Build gate — hermetic (DB calls fall back without a live database, 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: 24
cache: npm
- name: Install
run: npm ci
- name: Migration replay (baseline + seed on a fresh database)
run: npx drizzle-kit migrate
- name: Vote spine integration spec
run: INTEGRATION=1 npx vitest run src/lib/domain/__tests__/vote-spine.integration.test.ts