-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 1 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
UID=$(shell id -u)
GID=$(shell id -g)
DOCKER_PHP_SERVICE=php
up:
docker-compose up -d
down:
docker-compose down
build:
docker-compose build && \
docker-compose pull
install:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} composer install
bash:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} sh
logs:
docker-compose logs -f ${DOCKER_PHP_SERVICE}
.PHONY: tests
tests: ## execute project unit tests
docker-compose -f ./docker-compose.yml exec --user=$(id -u) ${DOCKER_PHP_SERVICE} sh -c "php ./vendor/bin/phpunit"
stan: ## pass phpstan
docker-compose -f ./docker-compose.yml exec --user=$(id -u) ${DOCKER_PHP_SERVICE} sh -c "php -d memory_limit=256M vendor/bin/phpstan analyse -c phpstan.neon"
cs: ## run phpcs checker
docker-compose -f ./docker-compose.yml exec --user=$(id -u) ${DOCKER_PHP_SERVICE} sh -c "phpcs --standard=phpcs.xml.dist"
grump: ## run grumphp
docker-compose -f ./docker-compose.yml exec --user=$(id -u) ${DOCKER_PHP_SERVICE} sh -c "./vendor/bin/grumphp run"