-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
34 lines (26 loc) · 1.57 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
.PHONY: it
it: coding-standards static-code-analysis tests ## Runs the coding-standards, static-code-analysis, and tests targets
.PHONY: code-coverage
code-coverage: vendor ## Collects coverage from running unit tests with phpunit/phpunit
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml.dist --coverage-text
.PHONY: coding-standards
coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-normalize, and fixes code style issues with easy-coding-standard/easy-coding-standard
composer normalize
vendor/bin/ecs --config=ecs.php --fix --verbose
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: mutation-tests
mutation-tests: vendor ## Runs mutation tests with infection/infection
vendor/bin/infection --configuration=infection.json.dist
.PHONY: static-code-analysis
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm
vendor/bin/psalm --config=psalm.xml --diff --show-info=false --stats --threads=4
.PHONY: static-code-analysis-baseline
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan and vimeo/psalm
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml
.PHONY: tests
tests: vendor ## Runs unit tests with phpunit/phpunit
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml.dist
vendor: composer.json composer.lock
composer install --no-interaction --no-progress