-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (30 loc) · 2.32 KB
/
Makefile
File metadata and controls
36 lines (30 loc) · 2.32 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
.PHONY: *
## —— Help ————————————————————————————————————
help: ## Show help
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' Makefile | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
## —— Tests ———————————————————————————————————
tests: ## Run tests
rm -rf $(shell php -r "echo sys_get_temp_dir();")/com.github.easycorp.easyadmin/tests/var/test/cache/*
SYMFONY_DEPRECATIONS_HELPER="$${SYMFONY_DEPRECATIONS_HELPER:-ignoreFile=./tests/baseline-ignore.txt}" php vendor/bin/simple-phpunit -v
tests-coverage: ## Generate test coverage
rm -rf $(shell php -r "echo sys_get_temp_dir();")/com.github.easycorp.easyadmin/tests/var/test/cache/*
XDEBUG_MODE=coverage php vendor/bin/simple-phpunit --coverage-html $(shell php -r "echo sys_get_temp_dir();")/com.github.easycorp.easyadmin/tests/var/test/coverage/
tests-coverage-view-in-browser: ## Open the generated HTML coverage in your default browser
sensible-browser "file://$(shell php -r "echo sys_get_temp_dir();")/com.github.easycorp.easyadmin/tests/var/test/coverage/index.html"
## —— Linters —————————————————————————————————
linter-cs-fixer: ## Lint PHP code (in dry-run mode, does not edit files)
docker run --rm -it --pull always -w=/app -v "$(shell pwd)":/app oskarstark/php-cs-fixer-ga:latest --diff -vvv --dry-run --using-cache=no
linter-phpstan: ## Lint PHP code (does not edit files)
php vendor/bin/phpstan analyse
linter-docs: ## Lint docs
docker run --rm -it --pull always -e DOCS_DIR='/docs' -v "$(shell pwd)"/doc:/docs oskarstark/doctor-rst:latest --short
linter-twig: ## Lint Twig templates (does not edit files)
./vendor/bin/twig-cs-fixer lint templates/
## —— Development —————————————————————————————
build: ## Initially build the package before development
composer update
yarn install
build-assets: ## Rebuild assets after changes in JS or SCSS
yarn encore production
php ./src/Resources/bin/fix-assets-manifest-file.php
checks-before-pr: linter-cs-fixer linter-phpstan linter-docs linter-twig tests ## Runs tests and linters which are also run on PRs