-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
49 lines (36 loc) · 1.22 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
DOCKER_COMPOSE = docker-compose
TEST = test/
BRANCH = master
.PHONY: build dev prod stop clean test feature-test lint lint-fix check update-patterns
update-patterns:
composer require elife/patterns:dev-$(BRANCH)
update-api-sdk:
composer require elife/api-sdk:dev-master
build: vendor
$(DOCKER_COMPOSE) build
vendor: composer.json composer.lock
composer install
@touch vendor
dev: build vendor
$(DOCKER_COMPOSE) up
prod: build vendor
API_URL=https://prod--gateway.elifesciences.org $(DOCKER_COMPOSE) up
stop:
$(DOCKER_COMPOSE) down
clean:
$(DOCKER_COMPOSE) down --volumes --remove-orphans
rm -rf vendor
test: vendor
APP_ENV=ci $(DOCKER_COMPOSE) run --rm app vendor/bin/phpunit $(TEST) $(OPTIONS)
feature-test:
docker-compose -f docker-compose.yml -f docker-compose.ci.yml up --build --detach
ifdef FEATURE
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm ci vendor/bin/behat $(FEATURE)
else
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm ci .ci/behat
endif
docker-compose -f docker-compose.yml -f docker-compose.ci.yml down --volumes
lint: vendor
.ci/phpcs
lint-fix: vendor
vendor/bin/phpcbf --standard=phpcs.xml.dist --warning-severity=0 -p app/ bin/ src/ web/ features/ test/