-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making things easier to run on CI and locally.
- Loading branch information
Showing
3 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
MIN_MSI=100 | ||
MIN_COVERED_MSI=100 | ||
|
||
ifeq ("${CI}", "true") | ||
PARALLELISM=4 | ||
else | ||
PARALLELISM=$(shell nproc) | ||
endif | ||
|
||
.PHONY: valid test coding-standard-fix coding-standard static-analysis unit-test mutation-test | ||
|
||
valid: coding-standard-fix coding-standard static-analysis test | ||
|
||
test: unit-test mutation-test | ||
|
||
vendor: composer.json | ||
composer install $(EXTRA_FLAGS) | ||
@touch -c vendor | ||
|
||
coding-standard: vendor | ||
vendor/bin/phpcs --parallel=$(PARALLELISM) | ||
|
||
coding-standard-fix: vendor | ||
vendor/bin/phpcbf --parallel=$(PARALLELISM) || true | ||
|
||
static-analysis: vendor | ||
vendor/bin/phpstan analyse $(EXTRA_FLAGS) | ||
|
||
unit-test: vendor | ||
vendor/bin/phpunit --testsuite unit --stop-on-error --stop-on-failure $(EXTRA_FLAGS) | ||
|
||
mutation-test: vendor | ||
vendor/bin/infection --no-progress -j=$(PARALLELISM) -s --min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) $(EXTRA_FLAGS) |