Skip to content

Commit bf16bf7

Browse files
committed
🔧 enforce coverage locally
1 parent 284798f commit bf16bf7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎composer.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"php-parallel-lint/php-parallel-lint": "^1.3",
1212
"phpstan/phpstan": "^1.10",
1313
"phpunit/phpunit": "^10.0 || ^11.0",
14+
"robiningelbrecht/phpunit-coverage-tools": "^1.8",
1415
"squizlabs/php_codesniffer": "^3.6"
1516
},
1617
"autoload": {
@@ -27,7 +28,7 @@
2728
"parallel-lint --exclude vendor ."
2829
],
2930
"phpunit": [
30-
"XDEBUG_MODE=coverage phpunit --coverage-clover coverage.clover tests"
31+
"XDEBUG_MODE=coverage phpunit -d --min-coverage=100 --coverage-clover coverage.clover tests"
3132
],
3233
"sniff": [
3334
"phpcs --standard=PSR12 src/ tests/"

‎phpunit.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@
99
<directory suffix=".php">./src</directory>
1010
</include>
1111
</source>
12+
<extensions>
13+
<bootstrap class="RobinIngelbrecht\PHPUnitCoverageTools\PhpUnitExtension">
14+
<parameter name="exitOnLowCoverage" value="1" />
15+
</bootstrap>
16+
</extensions>
1217
</phpunit>

0 commit comments

Comments
 (0)