-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 2.2 KB
/
Makefile
File metadata and controls
44 lines (30 loc) · 2.2 KB
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
.PHONY: deps deps-test deps-codestyle deps-static-analysis test test-lowest test-stable static-analysis codestyle-fix codestyle profile profile-view help
.DEFAULT_GOAL:=help
deps: ## Install project dependencies
XDEBUG_MODE=off composer update --prefer-dist --no-plugins --no-scripts $(COMPOSER_ARGS)
deps-test: ## Install PHPUnit dependencies
XDEBUG_MODE=off composer update --prefer-dist --no-plugins --no-scripts $(COMPOSER_ARGS) --working-dir=tools/phpunit
deps-codestyle: ## Install PHP-CS-Fixer dependencies
XDEBUG_MODE=off composer update --prefer-dist --no-plugins --no-scripts $(COMPOSER_ARGS) --working-dir=tools/php-cs-fixer
deps-static-analysis: ## Install dependencies for psalm
XDEBUG_MODE=off composer update --prefer-dist --no-plugins --no-scripts $(COMPOSER_ARGS) --working-dir=tools/psalm
test: deps deps-test ## Run the test with locked dependencies
XDEBUG_MODE=off tools/phpunit/vendor/bin/phpunit --colors=always
coverage: deps deps-test ## Run the test with locked dependencies
XDEBUG_MODE=coverage tools/phpunit/vendor/bin/phpunit --colors=always --coverage-xml ./test-results
coverage-text: deps deps-test ## Run the test with locked dependencies
XDEBUG_MODE=coverage tools/phpunit/vendor/bin/phpunit --colors=always --coverage-text --testdox
test-lowest: test ## Run the tests with lowest dependencies
test-lowest: COMPOSER_ARGS=--prefer-lowest
test-stable: test ## Run the tests with stable dependencies
test-stable: COMPOSER_ARGS=--prefer-stable
static-analysis: deps deps-static-analysis ## Run static code analysis
XDEBUG_MODE=off tools/psalm/vendor/bin/psalm --report=psalm-report.sarif
codestyle-fix: deps-codestyle ## Fix Codestyle issues
PHP_CS_FIXER_IGNORE_ENV=1 XDEBUG_MODE=off tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --show-progress=dots --ansi --verbose $(CS_FIXER_ARGS)
codestyle: codestyle-fix ## Show Codestyle issues
codestyle: CS_FIXER_ARGS=--dry-run
profile: deps deps-test ## Profile tests with Blackfire CLI
export XDEBUG_MODE=off export APP_ENV=prod blackfire run php tools/phpunit/vendor/bin/phpunit
help: ## Display this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'