-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (51 loc) · 1.73 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
59
60
61
62
63
64
.PHONY: clean code-style coverage help test test-unit test-integration static-analysis infection-testing install-dependencies update-dependencies
.DEFAULT_GOAL := test
PHPUNIT = ./vendor/bin/phpunit -c ./phpunit.xml
PHPSTAN = ./vendor/bin/phpstan --no-progress
PHPCS = ./vendor/bin/phpcs --extensions=php -v
PHPCBF = ./vendor/bin/phpcbf
INFECTION = ./vendor/bin/infection
COVCHK = ./vendor/bin/coverage-check
clean:
rm -rf ./build ./vendor
fix-code-style:
${PHPCBF}
code-style:
mkdir -p build/logs/phpcs
${PHPCS}
coverage:
${PHPUNIT} && ${COVCHK} build/logs/phpunit/coverage/coverage.xml 100
test:
${PHPUNIT}
test-unit:
${PHPUNIT} --testsuite=Unit
test-integration:
${PHPUNIT} --testsuite=Integration
static-analysis:
mkdir -p build/logs/phpstan
${PHPSTAN} analyse
infection-testing:
mkdir -p build/logs/infection
make coverage
cp -f build/logs/phpunit/junit.xml build/logs/phpunit/coverage/phpunit.junit.xml
${INFECTION} --coverage=build/logs/phpunit/coverage --min-msi=93 --threads=`nproc`
install-dependencies:
composer install
update-dependencies:
composer update
help:
# Usage:
# make <target> [OPTION=value]
#
# Targets:
# clean Cleans the coverage and the vendor directory
# code-style Check codestyle using phpcs
# coverage Generate code coverage (html, clover)
# help You're looking at it!
# test (default) Run all the tests with phpunit
# test-unit Run all the tests with phpunit
# test-integration Run all the tests with phpunit
# static-analysis Run static analysis using phpstan
# infection-testing Run infection/mutation testing
# install-dependencies Run composerupdate
# update-dependencies Run composer update