forked from DoclerLabs/codeception-slim-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 1 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
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " test to perform tests."
@echo " coverage to perform tests with code coverage."
@echo " static to run phpstan and php-cs-fixer check."
@echo " static-phpstan to run phpstan."
@echo " static-cs-check to run php-cs-fixer."
@echo " static-cs-fix to run php-cs-fixer, writing the changes."
.PHONY: test
test:
vendor/bin/codecept build
vendor/bin/codecept run
.PHONY: coverage
coverage:
vendor/bin/codecept build
vendor/bin/codecept run --coverage --coverage-xml --coverage-html
.PHONY: static
static: static-phpstan static-cs-check
static-phpstan:
docker run --rm -it -e REQUIRE_DEV=true -v ${PWD}:/app -w /app oskarstark/phpstan-ga:0.12.85 analyze $(PHPSTAN_PARAMS)
static-cs-fix:
docker run --rm -it -v ${PWD}:/app -w /app oskarstark/php-cs-fixer-ga:2.19.0 --diff-format udiff $(CS_PARAMS)
static-cs-check:
$(MAKE) static-cs-fix CS_PARAMS="--dry-run"