generated from ergebnis/php-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: it
it: fix stan test ## Run the commonly used targets
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: coverage
coverage: vendor ## Collects coverage from running unit tests with phpunit
mkdir -p .build/phpunit
vendor/bin/phpunit --dump-xdebug-filter=.build/phpunit/xdebug-filter.php
vendor/bin/phpunit --coverage-text --prepend=.build/phpunit/xdebug-filter.php
.PHONY: fix
fix: vendor
vendor/bin/php-cs-fixer fix
.PHONY: infection
infection: vendor ## Runs mutation tests with infection
mkdir -p .build/infection
vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=100 --min-msi=100
.PHONY: stan
stan: vendor ## Runs static analysis with phpstan
mkdir -p .build/phpstan
vendor/bin/phpstan analyse --configuration=phpstan.neon
.PHONY: test
test: vendor ## Runs auto-review, unit, and integration tests with phpunit
mkdir -p .build/phpunit
vendor/bin/phpunit --cache-result-file=.build/phpunit/result.cache
vendor: composer.json composer.lock
composer validate --strict
composer install
composer normalize