-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
45 lines (32 loc) · 1.03 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
test: phpunit phpcs
.PHONY: test phpunit phpcs
pretest:
if [ ! -d vendor ] || [ ! -f composer.lock ]; then composer install; else echo "Already have dependencies"; fi
phpunit: pretest
mkdir -p build
/usr/bin/php vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.clover --coverage-html=build
phpunit-ci: pretest
mkdir -p build
vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.clover
ifndef STRICT
STRICT = 0
endif
phpcs: pretest
vendor/bin/phpcs --standard=PSR1,PSR2 -n src tests/ examples/
phpcbf: pretest
vendor/bin/phpcbf --standard=PSR1,PSR2 -n src tests/ examples/
ocular:
wget https://scrutinizer-ci.com/ocular.phar
ifdef OCULAR_TOKEN
scrutinizer: ocular
@php ocular.phar code-coverage:upload --format=php-clover build/coverage.clover --access-token=$(OCULAR_TOKEN);
else
scrutinizer: ocular
php ocular.phar code-coverage:upload --format=php-clover build/coverage.clover;
endif
clean: clean-env clean-deps
clean-env:
rm -rf ocular.phar
rm -rf build
clean-deps:
rm -rf vendor/