CI, Testing & the TDD Gate
Nothing lands without a test. One gate script runs lint, unit and integration; each plugin's CI runs in isolation.
The gate
Work is validated by bin/pre-commit-check.sh:
./bin/pre-commit-check.sh --quick # lint + unit
./bin/pre-commit-check.sh --full # lint + unit + integration
./bin/pre-commit-check.sh --plugin shop --full # one plugin, deepThe engineering requirements are non-negotiable: TDD-first (red → green → refactor), DevOps-first (works cold from CI), SOLID, DI, DRY, clean code, and the agnostic-core oracles.
Test patterns
- Unit — services tested with
MagicMock()repositories, no database. - Integration — a
dbfixture builds the schema once per session and truncates per test. - Frontend — Vitest unit tests + Playwright E2E.
Per-plugin CI isolation
Each plugin repo's CI clones only that plugin. Because a lone plugin has no plugins.json, its on_enable registrations never fire unless a conftest enables it — so plugin test suites ship a _ensure_<plugin>_enabled fixture and skip-guard peer-dependent tests.
Lessons baked in
Green
--full ≠ correct. Grep for runtime readers before deleting a field; a dropped column can break untyped frontend reads while every test stays green. Screenshot money surfaces — €0.00 carts have shipped gate-green.