-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
69 lines (50 loc) · 1.73 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.PHONY: mu
mu: vendor ## Mutation tests
vendor/bin/infection -s --threads=$$(nproc) --min-msi=80 --min-covered-msi=80
.PHONY: tests
tests: vendor ## Run all tests
vendor/bin/phpunit --color
yarn test
.PHONY: cc
cc: vendor ## Show test coverage rates (HTML)
vendor/bin/phpunit
.PHONY: cs
cs: vendor ## Fix all files using defined ECS rules
vendor/bin/ecs check --fix
.PHONY: tu
tu: vendor ## Run only unit tests
vendor/bin/phpunit --color --group Unit
.PHONY: ti
ti: vendor ## Run only integration tests
vendor/bin/phpunit --color --group Integration
.PHONY: tf
tf: vendor ## Run only functional tests
vendor/bin/phpunit --color --group Functional
.PHONY: st
st: vendor ## Run static analyse
XDEBUG_MODE=off vendor/bin/phpstan analyse
################################################
.PHONY: ci-mu
ci-mu: vendor ## Mutation tests (for CI/CD only)
vendor/bin/infection --logger-github -s --threads=$$(nproc) --min-msi=80 --min-covered-msi=80
.PHONY: ci-cc
ci-cc: vendor ## Show test coverage rates (for CI/CD only)
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
.PHONY: ci-cs
ci-cs: vendor ## Check all files using defined ECS rules (for CI/CD only)
XDEBUG_MODE=off vendor/bin/ecs check
################################################
js: node_modules ## Execute JS tests
yarn test
node_modules: package.json
yarn install --force
.PHONY: rector
rector: vendor ## Check all files using Rector
XDEBUG_MODE=off vendor/bin/rector process --ansi --dry-run --xdebug
vendor: composer.json
composer validate
composer install
.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