-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (22 loc) · 825 Bytes
/
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
PROJECT_DIR := ${PWD}
IMAGE_NAME = kejwmen-phpunit_listeners
DOCKER_RUN_COMMAND = run -it --rm -v ${PROJECT_DIR}:/app
all: | build composer-install test
build:
docker build -t $(IMAGE_NAME) .
### COMPOSER
DOCKER_RUN_COMPOSER = $(DOCKER_RUN_COMMAND) --entrypoint=composer
composer-install:
docker $(DOCKER_RUN_COMPOSER) $(IMAGE_NAME) install
composer-update:
docker $(DOCKER_RUN_COMPOSER) $(IMAGE_NAME) update
composer:
docker $(DOCKER_RUN_COMPOSER) $(IMAGE_NAME) ${argument}
### QA
phpstan:
docker $(DOCKER_RUN_COMMAND) --entrypoint=vendor/bin/phpstan $(IMAGE_NAME) analyse src --level 7
test: test-with-phpdbg
test-with-phpdbg:
docker $(DOCKER_RUN_COMMAND) --entrypoint="/usr/local/bin/phpdbg" $(IMAGE_NAME) -qrr vendor/bin/phpunit
shell:
docker $(DOCKER_RUN_COMMAND) --entrypoint="/bin/sh" $(IMAGE_NAME)