-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
32 lines (24 loc) · 923 Bytes
/
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
PARALLELISM := $(shell nproc)
.PHONY: all
all: install phpcbf phpcs phpstan phpunit infection
.PHONY: install
install: vendor/composer/installed.json
vendor/composer/installed.json: composer.json composer.lock
@composer install $(INSTALL_FLAGS)
@touch -c composer.json composer.lock vendor/composer/installed.json
.PHONY: phpunit
phpunit:
@php -d zend.assertions=1 vendor/bin/phpunit --testsuite=unit
.PHONY: infection
infection:
@php -d zend.assertions=1 -d xdebug.mode=coverage vendor/bin/phpunit --testsuite=unit --coverage-xml=build/coverage-xml --log-junit=build/junit.xml $(PHPUNIT_FLAGS)
@php -d zend.assertions=1 vendor/bin/infection -s --threads=$(PARALLELISM) --coverage=build $(INFECTION_FLAGS)
.PHONY: phpcbf
phpcbf:
@vendor/bin/phpcbf --parallel=$(PARALLELISM)
.PHONY: phpcs
phpcs:
@vendor/bin/phpcs --parallel=$(PARALLELISM) $(PHPCS_FLAGS)
.PHONY: phpstan
phpstan:
@vendor/bin/phpstan analyse