Skip to content

Commit 1fa7e17

Browse files
Goosterhofclaude
andcommitted
ci: add coverage --min=95 gate with pcov driver
Adds a CI-time coverage floor to a published library that previously ran coverage: none. Measured coverage is 95.5% (67 tests); floor set at the measured value rounded down to a clean integer. - setup-php coverage: none -> pcov (fast driver, both PHP 8.4 + 8.5 legs) - new composer test:coverage script = pest --coverage --min=95 (teeth are the --min CLI flag, not a <coverage> XML block, which is a silent no-op on PHPUnit 10+) - CI Tests step now runs composer test:coverage; plain composer test stays for fast local runs without a coverage driver Teeth proven by exit code: --min=95 -> exit 0 (green), --min=96 -> exit 1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EmzU5UEBBVH4K691qiuxCh
1 parent 004aaea commit 1fa7e17

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: shivammathur/setup-php@728c6c6b8cf02c2e48117716a91ee48313958a19 # v2
2121
with:
2222
php-version: ${{ matrix.php }}
23-
coverage: none
23+
coverage: pcov
2424
tools: composer:v2
2525

2626
- name: Install dependencies
@@ -36,7 +36,7 @@ jobs:
3636
run: composer phpstan
3737

3838
- name: Tests
39-
run: composer test
39+
run: composer test:coverage
4040

4141
# Aggregate tracked by the town-crier trial (TC-0069), intended as the single
4242
# required check (the matrix legs stop being individually required).

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
},
4343
"scripts": {
4444
"test": "pest",
45+
"test:coverage": "pest --coverage --min=95",
4546
"phpstan": "phpstan analyse",
4647
"format": "pint",
4748
"format:check": "pint --test"

0 commit comments

Comments
 (0)