feat(ci): split check into fast and Postgres-backed integration gates #230

Merged
vas2000-work merged 2 commits from feat/pms-267-split-fast-integration-ci into main 2026-06-14 05:22:30 +02:00
Owner

What

Split the single combined check CI job into two workflows, and align the local hooks, so the fast gate is not blocked on a Postgres spin-up and a green hook corresponds one-to-one to a green CI gate.

  • check.yml is now the fast, database-free gate: migration-prefix check, fmt, clippy, cargo check --all-targets, cargo test --lib, cargo test --doc. Removed the Postgres services: block and job-level DATABASE_URL.
  • New integration.yml carries the Postgres-backed suite: same on: triggers, postgres:18.2-alpine3.23 with the existing health-check options, DATABASE_URL, and one cargo test --tests -- --test-threads=4 step (comments preserved).
  • justfile: pre-commit drops its integration step (no Postgres on commit), now mirroring the fast check.yml. New test-integration recipe mirrors integration.yml and omits --no-deps so the compose postgres dependency starts. install-hooks is unchanged.
  • README.md and CLAUDE.md command lists document the split.

Adapted to current main (post-PMS-255)

The PMS-267 spec was written against an older check.yml. Main has since advanced (David's PMS-255 epic). Deviations from the literal ACs, each driven by current source-of-truth:

  • Kept postgres:18.2-alpine3.23, not 16-alpine (no infra downgrade).
  • Used cargo test --tests, not the explicit --test auth --test contacts ... allowlist. PMS-198 deliberately removed that allowlist because it silently dropped 13 of 22 suites. This PR also converges the pre-commit hook back onto the same command as CI (they had drifted: the hook still used the old allowlist while check.yml had moved on).
  • Retained the migration-prefix nu step in the fast job.
  • Did not add SQLX_OFFLINE: "true" to check.yml: the crate has no compile-time sqlx::query! macros and no committed .sqlx/ data, so it is a no-op. Existing SQLX_OFFLINE flags in the compose-based recipes are left untouched.

Verification

  • just --list parses; pre-commit and test-integration present with clean descriptions.
  • Both workflow YAMLs parse (yaml.safe_load).
  • Not run on this host: the actual workflow runs and just test-integration require the Docker dev stack + Postgres (dev-container only). The change is config-only; the integration command is carried verbatim from the previously-green combined job.

#PMS-267

## What Split the single combined `check` CI job into two workflows, and align the local hooks, so the fast gate is not blocked on a Postgres spin-up and a green hook corresponds one-to-one to a green CI gate. - `check.yml` is now the fast, database-free gate: migration-prefix check, fmt, clippy, `cargo check --all-targets`, `cargo test --lib`, `cargo test --doc`. Removed the Postgres `services:` block and job-level `DATABASE_URL`. - New `integration.yml` carries the Postgres-backed suite: same `on:` triggers, `postgres:18.2-alpine3.23` with the existing health-check options, `DATABASE_URL`, and one `cargo test --tests -- --test-threads=4` step (comments preserved). - `justfile`: `pre-commit` drops its integration step (no Postgres on commit), now mirroring the fast `check.yml`. New `test-integration` recipe mirrors `integration.yml` and omits `--no-deps` so the compose `postgres` dependency starts. `install-hooks` is unchanged. - `README.md` and `CLAUDE.md` command lists document the split. ## Adapted to current main (post-PMS-255) The PMS-267 spec was written against an older `check.yml`. Main has since advanced (David's PMS-255 epic). Deviations from the literal ACs, each driven by current source-of-truth: - Kept `postgres:18.2-alpine3.23`, not `16-alpine` (no infra downgrade). - Used `cargo test --tests`, not the explicit `--test auth --test contacts ...` allowlist. PMS-198 deliberately removed that allowlist because it silently dropped 13 of 22 suites. This PR also converges the `pre-commit` hook back onto the same command as CI (they had drifted: the hook still used the old allowlist while `check.yml` had moved on). - Retained the migration-prefix `nu` step in the fast job. - Did not add `SQLX_OFFLINE: "true"` to `check.yml`: the crate has no compile-time `sqlx::query!` macros and no committed `.sqlx/` data, so it is a no-op. Existing `SQLX_OFFLINE` flags in the compose-based recipes are left untouched. ## Verification - `just --list` parses; `pre-commit` and `test-integration` present with clean descriptions. - Both workflow YAMLs parse (`yaml.safe_load`). - Not run on this host: the actual workflow runs and `just test-integration` require the Docker dev stack + Postgres (dev-container only). The change is config-only; the integration command is carried verbatim from the previously-green combined job. #PMS-267
feat(ci): split check into fast and Postgres-backed integration gates
All checks were successful
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 1m29s
E2E / Playwright against staging (pull_request) Successful in 1m41s
Integration / integration tests (pull_request) Successful in 4m52s
615adade0a
Split the single combined `check` job into two workflows so the fast fmt/clippy/compile/unit gate is not blocked on a Postgres spin-up and the local pre-commit hook can mirror it one-to-one.

check.yml is now the fast, database-free gate: migration-prefix check, fmt, clippy, `cargo check --all-targets`, `cargo test --lib`, `cargo test --doc`. Its Postgres `services:` block and job-level `DATABASE_URL` are gone.

New integration.yml carries the Postgres-backed suite: same `on:` triggers, the `postgres:18.2-alpine3.23` service with the existing health-check options, `DATABASE_URL`, and a single `cargo test --tests -- --test-threads=4` step (same comments preserved).

justfile: `pre-commit` drops its integration step so no Postgres starts on commit, mirroring the fast check.yml. A new `test-integration` recipe (group test) mirrors integration.yml byte-for-byte and omits `--no-deps` so the compose `postgres` dependency starts. README and CLAUDE.md command lists document the split.

Adapted to current main (post-PMS-255), which differs from the PMS-267 snapshot: kept `postgres:18.2-alpine3.23` (not 16-alpine), used `cargo test --tests` rather than the explicit `--test auth ...` allowlist that PMS-198 deliberately removed (it silently dropped 13 of 22 suites), and retained the migration-prefix nu step in the fast job. SQLX_OFFLINE was not added to check.yml: the crate has no compile-time `sqlx::query!` macros and no `.sqlx/` data, so it is a no-op. This also converges the pre-commit hook back onto the same integration command as CI, which had drifted apart on main.

#PMS-267

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge branch 'main' into feat/pms-267-split-fast-integration-ci
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 1m10s
E2E / Playwright against staging (pull_request) Failing after 2m33s
Integration / integration tests (pull_request) Successful in 4m26s
3d75880c7e
vas2000-work deleted branch feat/pms-267-split-fast-integration-ci 2026-06-14 05:22:30 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!230
No description provided.