forked from Spomky-Labs/otphp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (44 loc) · 1.72 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
########################
# CI/CD #
########################
ci-cs: vendor ## Check all files using defined rules (CI/CD)
vendor/bin/ecs check
ci-st: vendor ## Run static analyse (CI/CD)
vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr
ci-rector: vendor ## Check all files using Rector (CI/CD)
vendor/bin/rector process --ansi --dry-run
ci-mu: vendor ## Mutation tests (CI/CD)
vendor/bin/infection --logger-github --git-diff-filter=AM -s --threads=$(nproc) --min-msi=70 --min-covered-msi=50 --test-framework-options="--exclude-group=Performance"
########################
# Everyday #
########################
all: vendor ## Run all tests
vendor/bin/phpunit --color
tu: vendor ## Run only unit tests
vendor/bin/phpunit --color tests
st: vendor ## Run static analyse
vendor/bin/phpstan analyse
########################
# Every PR #
########################
cs: vendor ## Fix all files using defined rules
vendor/bin/ecs check --fix
rector: vendor ## Check all files using Rector
vendor/bin/rector process
########################
# Others #
########################
mu: vendor ## Mutation tests
vendor/bin/infection -s --threads=$(nproc) --min-msi=70 --min-covered-msi=50 --test-framework-options="--exclude-group=Performance"
cc: vendor ## Show test coverage rates (HTML)
vendor/bin/phpunit --coverage-html ./build
vendor: composer.json composer.lock
composer validate
composer install
########################
# Default #
########################
.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