-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
37 lines (25 loc) · 1.24 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
.PHONY: app-composer-check app-composer-fix app-cs-check app-cs-fix app-install app-security-check app-static-analysis \
app-test app-test-with-code-coverage
default: help
help:
@grep -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | sort | awk '{split($$0, a, ":"); printf "\033[36m%-30s\033[0m %-30s %s\n", a[1], a[2], a[3]}'
infra-up: ## install and launch php container
cd docker && docker-compose up -d
infra-shell: ## run shell into php docker
docker exec -ti docker-php-1 sh
app-composer-check: ## to validate Composer config
composer validate
app-cs-check: ## to launch php-cs-fixer in dry mode
vendor/bin/php-cs-fixer fix --allow-risky yes --dry-run --diff --verbose
app-cs-fix: ## to launch php-cs-fixer
vendor/bin/php-cs-fixer fix --allow-risky yes --verbose
app-install: ## to install dependencies
composer install --prefer-dist
app-security-check: ## to check if any security issues in the PHP dependencies
composer audit
app-static-analysis: ## to run static analysis
vendor/bin/phpstan analyze --memory-limit=-1
app-test: ## to launch phpunit to test app
vendor/bin/phpunit --fail-on-warning
app-test-with-code-coverage: ## to run unit tests with code-coverage
vendor/bin/phpunit --fail-on-warning --coverage-filter --colors=never