Skip to content

Commit fb8d0c2

Browse files
authored
Add code coverage safeguards (#231)
1 parent afb0ac2 commit fb8d0c2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ all: test
5050
ci-test: SILENT=
5151
ci-test: prerequisites
5252
$(SILENT) $(PHP) $(PHPUNIT) $(PHPUNIT_COVERAGE_CLOVER) --group=$(PHPUNIT_GROUP)
53+
$(SILENT) $(PHP) vendor/bin/coverage-check build/logs/clover.xml 100
5354

5455
ci-analyze: SILENT=
5556
ci-analyze: prerequisites ci-phpunit ci-infection ci-phpstan ci-psalm
@@ -90,6 +91,7 @@ test-prerequisites: prerequisites composer.lock
9091
phpunit: cs
9192
rm -fr build/logs/*
9293
$(SILENT) $(PHP) $(PHPUNIT) $(PHPUNIT_ARGS)
94+
$(SILENT) $(PHP) vendor/bin/coverage-check build/logs/clover.xml 100
9395

9496
.PHONY: infection
9597
infection: phpunit

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"require-dev": {
1616
"ergebnis/composer-normalize": "^2.8",
17+
"esi/phpunit-coverage-check": ">2",
1718
"friendsofphp/php-cs-fixer": "^3.17",
1819
"infection/infection": ">=0.30.3",
1920
"league/pipeline": "^0.3 || ^1.0",
@@ -22,6 +23,7 @@
2223
"phpstan/phpstan": "^2",
2324
"phpunit/phpunit": ">=9.4 <12",
2425
"sanmai/phpstan-rules": "^0.3.0",
26+
"sanmai/phpunit-double-colon-syntax": "^0.1.1",
2527
"vimeo/psalm": ">=2"
2628
},
2729
"autoload": {

0 commit comments

Comments
 (0)