generated from blanc-frederic/hexagonal-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (45 loc) · 1.37 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
EXEC_PHP = php
EXEC_VENDOR = @bin/vendor
SYMFONY = symfony
COMPOSER = @bin/composer
CONSOLE = @bin/console
install: ## Install this project
install: .env.local vendor
server: ## Run webserver with this project
server: .env.local vendor
$(SYMFONY) serve
.PHONY: install server
check: ## Launch all checks & lints
check: vendor
$(COMPOSER) validate
$(CONSOLE) lint:container
$(CONSOLE) lint:twig templates --show-deprecations
$(CONSOLE) lint:yaml config
cs-fix: ## apply php-cs-fixer fixes
cs-fix: vendor
@bin/php-cs-fixer fix --using-cache=no --diff --config .php-cs-fixer.dist.php --allow-risky=yes --using-cache=no
.PHONY: check cs-fix
qa: ## Run all analyses & tests
qa: vendor
$(EXEC_VENDOR) deptrac
$(EXEC_VENDOR) phpstan analyse src
bin/phpunit --testsuite full
test: ## Run unit tests only
test: vendor
bin/phpunit
coverage: ## Run all tests with code coverage
coverage: vendor
bin/phpunit --testsuite full --coverage-html var/report
.PHONY: test qa coverage
# rules based on files
vendor: composer.lock
$(COMPOSER) install
@touch --no-create vendor
.env.local:
@echo "Please configure this project by editing .env.local"
@exit 1
# generate help
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: help