-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
53 lines (40 loc) · 1.52 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: code-coverage
code-coverage: vendor ## Show test coverage rates (console)
vendor/bin/phpunit --coverage-text
.PHONY: coverage
coverage: vendor ## Show test coverage rates (HTML)
vendor/bin/phpunit --coverage-html ./build
.PHONY: fix-cs
fix-cs: vendor ## Fix all files using defined PHP-CS-FIXER rules
vendor/bin/php-cs-fixer fix
.PHONY: coding-standards
coding-standards: vendor ## Check all files using ECS rules
vendor/bin/ecs check
.PHONY: tests
tests: vendor ## Run all tests
vendor/bin/phpunit --color
vendor: composer.json composer.lock
composer validate
composer install
.PHONY: tu
tu: vendor ## Run only unit tests
vendor/bin/phpunit --color --group Unit
.PHONY: tf
tf: vendor ## Run only functional tests
vendor/bin/phpunit --color --group Functional
.PHONY: static-analyse
static-analyse: vendor ## Run static analyse
vendor/bin/phpstan analyse
.PHONY: rector
rector: vendor ## Check all files using Rector
vendor/bin/rector process --ansi --dry-run -v
.PHONY: mutation-tests
mutation-tests: vendor ## Mutation tests
vendor/bin/infection -s --threads=$(nproc) --min-msi=64 --min-covered-msi=74
.PHONY: mutation-tests-github
mutation-tests-github: vendor ## Mutation tests (for Github only)
vendor/bin/infection --logger-github --git-diff-filter=AM -s --threads=$(nproc) --min-msi=64 --min-covered-msi=74
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help