-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
37 lines (25 loc) · 1015 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
33
34
35
36
37
SOURCE = $(shell find src test -type f)
test: | vendor
php -c test/etc/php.ini vendor/bin/peridot
coverage: artifacts/tests/coverage/index.html
coverage-open: artifacts/tests/coverage/index.html
open artifacts/tests/coverage/index.html
lint: $(SOURCE) | vendor
@mkdir -p artifacts/
vendor/bin/php-cs-fixer fix --allow-risky=yes
prepare: lint coverage
composer validate
travis lint
ci: artifacts/tests/coverage/clover.xml
php -c test/etc/php.ini -d zend.assertions=-1 vendor/bin/peridot
.PHONY: FORCE test coverage coverage-open lint prepare ci
vendor: composer.lock
composer install
composer.lock: composer.json
composer update
artifacts/tests/coverage/index.html: $(SOURCE) | vendor
phpdbg -c test/etc/php.ini -qrr vendor/bin/peridot --reporter html-code-coverage --code-coverage-path=$(@D)
artifacts/tests/coverage/clover.xml: $(SOURCE) | vendor
phpdbg -c test/etc/php.ini -qrr vendor/bin/peridot --reporter clover-code-coverage --code-coverage-path=$@
%.php: FORCE
@php -l $@ > /dev/null