-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (42 loc) · 1.38 KB
/
Makefile
File metadata and controls
59 lines (42 loc) · 1.38 KB
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
.DOCKER_RUN_PHP:= docker-compose run --rm mappics
.RUN=
ifneq ($(AM_I_INSIDE_DOCKER),true)
.RUN := $(.DOCKER_RUN_PHP)
endif
.PHONY: build up down down-with-volumes unit-test integration-test phpstan cs-fixer
setup: build dependencies migrations
start: up
stop: down
destroy: down-with-volumes
restart: stop start
test: dependencies cache-test migrations-test phpunit
coverage: dependencies cache-test migrations-test phpunit-coverage
qa-suite: dependencies cache-test migrations-test phpstan phpunit infection
build:
docker-compose build --no-cache
up:
docker-compose up -d
down:
docker-compose down
down-with-volumes:
docker-compose down --remove-orphans --volumes
dependencies:
$(.RUN) composer install
migrations:
$(.RUN) bin/console doctrine:migrations:migrate --env=dev --no-interaction
migrations-test:
$(.RUN) bin/console doctrine:migrations:migrate --env=test --no-interaction
cache:
$(.RUN) bin/console cache:clear --env=dev
cache-test:
$(.RUN) bin/console cache:clear --env=test
phpunit:
$(.RUN) vendor/bin/phpunit
phpunit-coverage:
$(.RUN) php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-html=var/coverage --coverage-text
phpstan:
$(.RUN) vendor/bin/phpstan analyse --level=max src/ -c phpstan-baseline.neon
infection:
$(.RUN) vendor/bin/infection --threads=4 --min-msi=74 --initial-tests-php-options='-dxdebug.mode=coverage'
shell:
$(.DOCKER_RUN_PHP) bash