-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
37 lines (25 loc) · 939 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
_GENERATE_DIR=./src/
ifdef GENERATE_DIR
_GENERATE_DIR=$(GENERATE_DIR)
endif
phpcs: pretest
vendor/bin/phpcs --standard=PSR2 -n src test/unit/
phpcbf: pretest
vendor/bin/phpcbf --standard=PSR2 -n src test/unit/
pretest:
if [ ! -d vendor ] || [ ! -f composer.lock ]; then composer install; else echo "Already have dependencies"; fi
if [ ! -d build ]; then mkdir build; fi
phpunit-ci-unit: pretest
php vendor/bin/phpunit -c phpunit.xml --coverage-text --coverage-clover=build/coverage.clover
phpunit-ci-integration: pretest
php vendor/bin/phpunit -c phpunit.device.xml --coverage-text --coverage-clover=build/coverage.clover
ocular:
if [ ! -f ocular.phar ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
scrutinizer: ocular
php ocular.phar code-coverage:upload --format=php-clover build/coverage.clover
clean: clean-env clean-deps
clean-env:
rm -rf ocular.phar
rm -rf build
clean-deps:
rm -rf vendor/