Skip to content

Commit 3094651

Browse files
committed
Add Makefile
1 parent a95d931 commit 3094651

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
DOCKER_RUN = docker-compose run client_72
2+
3+
.PHONY: help
4+
help:
5+
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-25s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
6+
7+
.PHONY: dependencies
8+
dependencies: ## Install composer dependencies
9+
cp docker-compose.yml.dist docker-compose.yml
10+
rm -rf composer.lock vendor/
11+
$(DOCKER_RUN) composer install
12+
13+
.PHONY: tests
14+
tests: ## Run PHPUnit & PHPSpec tests, and code style check
15+
@echo "-----------"
16+
@echo "- PHPUnit -"
17+
@echo "-----------"
18+
$(DOCKER_RUN) bin/phpunit -c phpunit.xml.dist
19+
@echo ""
20+
@echo "-----------"
21+
@echo "- PHPSpec -"
22+
@echo "-----------"
23+
$(DOCKER_RUN) bin/phpspec run
24+
@echo "------------------"
25+
@echo "- PHP code style -"
26+
@echo "------------------"
27+
$(DOCKER_RUN) bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
28+
29+
.PHONY: fix-cs
30+
fix-cs: ## Fix PHP code style
31+
$(DOCKER_RUN) bin/php-cs-fixer fix --config=.php_cs.php

0 commit comments

Comments
 (0)