test: lock in the app readiness gate with static, deterministic and real-stack probes (E00-S03-T06)
This commit is contained in:
@@ -134,6 +134,39 @@ jobs:
|
||||
- name: Run migration failure diagnostic test suite
|
||||
run: node --test tests/database-postgres-diagnostic.test.mjs
|
||||
|
||||
# E00-S03-T06: the static assertions of tests/app-readiness.test.mjs gate
|
||||
# every PR — the suite locks in the readiness gate (the app answers
|
||||
# GET /health with 503 {"status":"not ready"} until the startup migration
|
||||
# run completes, then 200 {"status":"ok"}) with mutation probes, the
|
||||
# deterministic probes (boot the committed server: no DATABASE_URL ->
|
||||
# ready immediately; unreachable DATABASE_URL -> stays not-ready) run on
|
||||
# Node 24, and the docker-gated real-stack probe (the issue's test plan:
|
||||
# "start with pending migrations and confirm readiness waits" — the app's
|
||||
# migration run is blocked behind a held ACCESS EXCLUSIVE lock on the
|
||||
# migration ledger, /health stays not-ready, then flips ready once the lock
|
||||
# releases) runs where a Docker daemon is available and skips cleanly
|
||||
# otherwise. The job installs the frozen workspace and builds the
|
||||
# database-postgres package because the probes boot the committed server
|
||||
# from the host (it imports @personal-blog/database-postgres through the
|
||||
# package's own links).
|
||||
app-readiness:
|
||||
name: App readiness after migrations (E00-S03-T06)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
|
||||
run: corepack enable
|
||||
- name: Install dependencies (frozen lockfile)
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Build the database-postgres package (the probes boot the committed server which imports it)
|
||||
run: pnpm --filter @personal-blog/database-postgres build
|
||||
- name: Run app readiness test suite
|
||||
run: node --test tests/app-readiness.test.mjs
|
||||
|
||||
# E00-S03-T01: the static assertions of tests/compose-config.test.mjs (db
|
||||
# image pinned to postgres:18.6-bookworm, health gate, volume persistence,
|
||||
# build platforms) gate every PR (the docker-gated real-stack probes inside
|
||||
|
||||
Reference in New Issue
Block a user