-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
58 lines (39 loc) · 1.01 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
PHPUNIT=./vendor/bin/phpunit
PHPCS=./vendor/bin/phpcs
PHPCBF=./vendor/bin/phpcbf
PHPSTAN=./vendor/phpstan/phpstan/bin/phpstan
INFECTION=./vendor/infection/infection/bin/infection
.PHONY: all
# Default target when just running 'make'
all: analyze test
vendor: composer.json composer.lock
composer install
build/logs:
mkdir -p build/logs
$(PHPUNIT): vendor
$(PHPCS): vendor
$(PHPCBF): vendor
$(PHPSTAN): vendor
$(INFECTION): vendor
#
# T E S T S
#
.PHONY: test test-unit test-infection
test: test-unit test-infection
test-unit: $(PHPUNIT) vendor build/logs
$(PHPUNIT) --coverage-text
test-infection: $(INFECTION) vendor build/logs
$(INFECTION) --threads=4 --only-covered --min-covered-msi=50
#
# A N A L Y S I S
#
.PHONY: analyze cs-fix cs-check phpstan validate
analyze: cs-check phpstan validate
cs-fix: $(PHPCBF)
$(PHPCBF) src --standard=phpcs.ruleset.xml
cs-check: $(PHPCS)
$(PHPCS) src --standard=phpcs.ruleset.xml
phpstan: $(PHPSTAN)
$(PHPSTAN) analyze src --level=3
validate:
composer validate --strict