This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (41 loc) · 1.63 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
PHP = php
DOCKER_RUN = docker run --rm --interactive --tty --volume $(PWD):/app --workdir /app jakzal/phpqa:php7.3-alpine
##
## Dependencies
## -----
##
composer-require-symfony-version: ## Require specific version of Symfony
composer require symfony/config:$(SYMFONY_VERSION) symfony/form:$(SYMFONY_VERSION) symfony/framework-bundle:$(SYMFONY_VERSION) symfony/templating:$(SYMFONY_VERSION) symfony/security-csrf:$(SYMFONY_VERSION) symfony/twig-bundle:$(SYMFONY_VERSION) symfony/var-dumper:$(SYMFONY_VERSION) --no-update
composer-install: ## Install Composer dependencies
composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest
composer-update: ## Install Composer dependencies
composer update --no-progress --prefer-dist --optimize-autoloader --no-suggest
pull-docker-image: ## Pull Docker image for QA
docker pull jakzal/phpqa:1.25-php7.2-alpine
##
## Tests
## -----
##
phpspec: ## phpspec
$(PHP) ./vendor/bin/phpspec run --format=pretty
phpunit: ## PHPUnit
$(PHP) ./vendor/bin/phpunit --testdox
behat: ## Behat
$(PHP) ./vendor/bin/behat --colors --strict -vv
tests: phpspec phpunit behat ## Run all tests
##
## QA
## --
##
php-cs-fixer: ## PHP-CS-Fixer
$(DOCKER_RUN) php-cs-fixer fix src/
php-cs-fixer-dry-run: ## PHP-CS-Fixer
$(DOCKER_RUN) php-cs-fixer fix src/ --dry-run
phpstan: ## PHPStan
$(DOCKER_RUN) phpstan analyse --no-progress
qa: php-cs-fixer phpstan ## Run all QA tasks
.PHONY: php-cs-fixer phpstan
.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