-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
54 lines (42 loc) · 1.74 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
current-dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SHELL = /bin/sh
docker-container = kalendapp-php-fpm
#
# ❓ Help output
#
help: ## Show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\-\/]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-24s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
#
# 🐘 Build and run
#
start: ## Start and run project
docker-compose up -d
stop: ## Stop project
docker-compose down
install: ## Install dependencies
docker exec $(docker-container) composer install
#
# 🔬 Testing
#
test/all: ## Execute all tests
docker exec $(docker-container) ./vendor/bin/phpunit --testsuite Unit
docker exec $(docker-container) ./vendor/bin/phpunit --testsuite Integration
docker exec $(docker-container) ./vendor/bin/behat
test/unit: ## Execute unit tests
docker exec $(docker-container) ./vendor/bin/phpunit --testsuite Unit
test/integration: ## Execute integration tests
docker exec $(docker-container) ./vendor/bin/phpunit --testsuite Integration
test/functional: ## Execute functional tests
docker exec $(docker-container) ./vendor/bin/behat
#
# 💅 Style and errors
#
style/all: ## Analyse code style and possible errors
docker exec $(docker-container) ./vendor/bin/php-cs-fixer fix --dry-run --diff --config .php_cs.dist
docker exec $(docker-container) ./vendor/bin/phpstan analyse -c phpstan.neon
style/code-style: ## Analyse code style
docker exec $(docker-container) ./vendor/bin/php-cs-fixer fix --dry-run --diff --config .php_cs.dist
style/static-analysis: ## Find possible errors with static analysis
docker exec $(docker-container) ./vendor/bin/phpstan analyse -c phpstan.neon
style/fix: ## Fix code style
docker exec $(docker-container) ./vendor/bin/php-cs-fixer fix --config .php_cs.dist