-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 1.42 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
REPORTS_DIR ?= build/reports
.PHONY: audit
audit: phpcs phpstan
.PHONY: prepare-ci
prepare-ci:
@mkdir -p build/reports
.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=-1 src tests --level max
.PHONY: phpstan-ci
phpstan-ci: prepare-ci
vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=-1 --level max --error-format checkstyle src tests | awk NF > $(REPORTS_DIR)/phpstan.xml
.PHONY: phpcs
phpcs:
vendor/bin/phpcs -sp --standard=phpcs.xml.dist --extensions=php --ignore=*/tests/bootstrap.php src tests
.PHONY: phpcs-ci
phpcs-ci: prepare-ci
vendor/bin/phpcs -sp --report=checkstyle --report-file=$(REPORTS_DIR)/phpcs.xml --standard=phpcs.xml.dist --extensions=php --ignore=*/tests/bootstrap.php src tests
phpmd:
vendor/bin/phpmd src text phpmd.xml
.PHONY: unit-tests
unit-tests:
@vendor/bin/codecept run Unit
.PHONY: unit-tests-coverage
unit-tests-coverage:
XDEBUG_MODE=coverage php -dauto_prepend_file=bin/xdebug_coverage_filter.php vendor/bin/codecept run Unit --coverage
.PHONY: unit-tests
unit-tests-ci: prepare-ci
@vendor/bin/codecept run Unit --xml $(PWD)/$(REPORTS_DIR)/unit-tests.xml
.PHONY: functional-tests
functional-tests:
@bin/functional_tests.sh $(PHPUNIT_EXTRA_ARGS)
.PHONY: functional-tests-ci
functional-tests-ci: prepare-ci ## Run functional tests and generate report file
- bin/functional_tests.sh --xml $(PWD)/$(REPORTS_DIR)/functional-tests.xml $(PHPUNIT_EXTRA_ARGS)