forked from php-kafka/php-avro-schema-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.44 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
.PHONY: clean code-style coverage help static-analysis update-dependencies install-dependencies infection-testing
.DEFAULT_GOAL := coverage
PHPUNIT = ./vendor/bin/phpunit -c ./phpunit.xml
PHPSTAN = ./vendor/bin/phpstan
PHPCS = ./vendor/bin/phpcs --extensions=php
PHPCBF = ./vendor/bin/
INFECTION = ./vendor/bin/infection
CONSOLE = ./bin/console
COVCHECK = ./vendor/bin/coverage-check
clean:
rm -rf ./build ./vendor
code-style:
${PHPCS} --report-full --report-gitblame --standard=PSR12 ./src
coverage:
${PHPUNIT} && ${COVCHECK} ./build/logs/phpunit/clover.xml 100
cp ./build/logs/phpunit/clover.xml ./
fix-code-style:
${PHPCBF} src/ --standard=PSR12
infection-testing:
make coverage
${INFECTION} --coverage=build/logs/phpunit --min-msi=68 --threads=`nproc`
static-analysis:
${PHPSTAN} analyse --memory-limit 256m --no-progress
update-dependencies:
composer update
install-dependencies:
composer install
help:
# Usage:
# make <target> [OPTION=value]
#
# Targets:
# clean Cleans the coverage and the vendor directory
# code-style Check codestyle using phpcs
# coverage (default) Generate code coverage (html, clover)
# fix-code-style Fix code style
# help You're looking at it!
# infection-testing Run infection/mutation testing
# static-analysis Run static analysis using phpstan
# update-dependencies Run composer update
# install-dependencies Run composer install