forked from ekino/EkinoDataProtectionBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 1.17 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
.PHONY: app-composer-validate app-cs-check app-cs-fix app-install app-security-check app-static-analysis app-test \
app-test-with-code-coverage ci
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]}'
app-composer-validate: ## to validate composer config
composer validate
app-cs-check: ## to show files that need to be fixed
vendor/bin/php-cs-fixer fix --dry-run --diff --verbose
app-cs-fix: ## to fix files that need to be fixed
vendor/bin/php-cs-fixer fix --verbose
app-install: ## to install app
composer install --prefer-dist
app-security-check: ## to check if any security issues in the PHP dependencies
vendor/bin/security-checker security:check
app-static-analysis: ## to run static analysis
php -dmemory_limit=-1 vendor/bin/phpstan analyze . -l 5
app-test: ## to run unit tests
vendor/bin/phpunit
app-test-with-code-coverage: ## to run unit tests with code-coverage
vendor/bin/phpunit --coverage-text --colors=never
ci: ## to run checks during ci
make app-composer-validate app-test-with-code-coverage app-static-analysis app-cs-check app-security-check