From c7106e36950756d0c7e0b2303f607bfc8659c886 Mon Sep 17 00:00:00 2001 From: Mustapha Ben Date: Fri, 30 Oct 2026 00:07:25 +0100 Subject: [PATCH] chore: require 80% line coverage instead of exactly 100% composer test:unit now runs pest --coverage --min=80; type coverage stays at 100%. The README and specs describe the new gate. Co-Authored-By: Claude Opus 5.5 --- README.md | 6 +++--- composer.json | 2 +- docs/specs/build-prompt.md | 2 +- docs/specs/ddd.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 434b7b6..b8d0ea3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![tests](https://github.com/DevPlus31/atrium/actions/workflows/tests.yml/badge.svg)](https://github.com/DevPlus31/atrium/actions/workflows/tests.yml) -A modular admin panel and app template: Laravel 13 · Inertia v3 · React 19 · TypeScript · Tailwind v4 · shadcn/ui. A generic **shell** (auth, account settings, theming, the module contract) hosts **modules**, one folder per business domain. Strict by construction: PHPStan max, 100% line and type coverage, architecture tests, PostgreSQL and SQLite in CI. +A modular admin panel and app template: Laravel 13 · Inertia v3 · React 19 · TypeScript · Tailwind v4 · shadcn/ui. A generic **shell** (auth, account settings, theming, the module contract) hosts **modules**, one folder per business domain. Strict by construction: PHPStan max, at least 80% line coverage and 100% type coverage, architecture tests, PostgreSQL and SQLite in CI. ## Quick start @@ -461,7 +461,7 @@ After a change, check light and dark, each preset, `rtl`, and the `topbar` layou ## Testing and quality gates (all must pass) ```bash -composer test # CI's main job: lint check, type coverage, PHPStan + tsc, tests with 100% coverage +composer test # CI's main job: lint check, type coverage, PHPStan + tsc, tests with at least 80% coverage composer lint # fixers: Rector, Pint, Oxfmt, OxLint, theme lint ``` @@ -471,7 +471,7 @@ The same gates one by one: vendor/bin/pint --dirty --format agent && vendor/bin/rector && vendor/bin/phpstan bun run test:types && bun run test:lint bun run build # browser tests use the production build -XDEBUG_MODE=coverage vendor/bin/pest --parallel --coverage --exactly=100.0 # includes browser tests +XDEBUG_MODE=coverage vendor/bin/pest --parallel --coverage --min=80 # includes browser tests vendor/bin/pest --type-coverage --min=100 php artisan test --compact app-modules/Catalog/tests/Feature/ProductControllerTest.php # one file ``` diff --git a/composer.json b/composer.json index 79d39a5..6abf417 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "rector --dry-run", "bun run test:lint" ], - "test:unit": "XDEBUG_MODE=\"coverage\" pest --parallel --coverage --exactly=100.0", + "test:unit": "XDEBUG_MODE=\"coverage\" pest --parallel --coverage --min=80", "test:types": [ "phpstan", "bun run test:types" diff --git a/docs/specs/build-prompt.md b/docs/specs/build-prompt.md index 724fd99..8cbcc91 100644 --- a/docs/specs/build-prompt.md +++ b/docs/specs/build-prompt.md @@ -4,7 +4,7 @@ ## Role -Build a modular, extensible admin panel on top of the `nunomaduro/laravel-starter-kit-inertia-react` template. Follow the template's philosophy without exception: ultra-strict types, single-purpose action classes, "Cruddy by Design" controllers, PHPStan level max, Pest with 100% type and test coverage, Rector, Laravel Pint, strict TypeScript, and the kit's Vite Plus unified toolchain (OxLint + Oxfmt — no Prettier/ESLint). +Build a modular, extensible admin panel on top of the `nunomaduro/laravel-starter-kit-inertia-react` template. Follow the template's philosophy without exception: ultra-strict types, single-purpose action classes, "Cruddy by Design" controllers, PHPStan level max, Pest with 100% type coverage and at least 80% test coverage, Rector, Laravel Pint, strict TypeScript, and the kit's Vite Plus unified toolchain (OxLint + Oxfmt — no Prettier/ESLint). ## Prime directives diff --git a/docs/specs/ddd.md b/docs/specs/ddd.md index 9a272c7..fc2b932 100644 --- a/docs/specs/ddd.md +++ b/docs/specs/ddd.md @@ -88,7 +88,7 @@ Domain-specific pieces the generator cannot infer — Value Objects, Domain Even ## Definition of done -PHPStan max · Rector · Pint · Pest 100% line **and** type coverage · `tsc --noEmit` · OxLint/Oxfmt · `theme-lint` · arch tests (module contract + boundaries) · browser smoke test (`composer test` runs them; commands in the README's "Testing and quality gates"). Migrations are **up-only** (module migrations are measured for coverage; an un-exercised `down()` fails the gate). +PHPStan max · Rector · Pint · Pest ≥ 80% line and 100% type coverage · `tsc --noEmit` · OxLint/Oxfmt · `theme-lint` · arch tests (module contract + boundaries) · browser smoke test (`composer test` runs them; commands in the README's "Testing and quality gates"). Migrations are **up-only** (module migrations are measured for coverage, so an un-exercised `down()` counts against it). ## Downstream continuation