forked from TheSoftwareHouse/fogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (47 loc) · 1.43 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
55
56
57
DOCKER_COMPOSE = docker-compose -f docker-compose.yml -f docker-compose.override.yml
DOCKER_COMPOSE_TEST_MYSQL = ${DOCKER_COMPOSE} -f docker-compose.test-mysql.yml
DOCKER_COMPOSE_TEST_POSTGRES = ${DOCKER_COMPOSE} -f docker-compose.test-postgres.yml
# --- docker
.PHONY: pull
pull:
${DOCKER_COMPOSE} pull
.PHONY: install
install:
${DOCKER_COMPOSE} run --rm --entrypoint="composer" app install
.PHONY: start
start:
${DOCKER_COMPOSE} up -d
echo "waiting for services to start..."
sleep 16
.PHONY: stop
stop:
${DOCKER_COMPOSE} stop
# --- test
.PHONY: test
test:
make test-mysql
make test-postgres
.PHONY: test-mysql
test-mysql:
${DOCKER_COMPOSE_TEST_MYSQL} up -d --scale=worker=0
sleep 16
${DOCKER_COMPOSE_TEST_MYSQL} run --rm --entrypoint="php" app vendor/bin/behat --format=progress
${DOCKER_COMPOSE_TEST_MYSQL} run --rm --entrypoint="php" app vendor/bin/phpspec run
${DOCKER_COMPOSE} up -d --remove-orphans
.PHONY: test-postgres
test-postgres:
${DOCKER_COMPOSE_TEST_POSTGRES} up -d --scale=worker=0
sleep 16
${DOCKER_COMPOSE_TEST_POSTGRES} run --rm --entrypoint="php" app vendor/bin/behat --format=progress
${DOCKER_COMPOSE_TEST_POSTGRES} run --rm --entrypoint="php" app vendor/bin/phpspec run
${DOCKER_COMPOSE} up -d --remove-orphans
# --- fogger
.PHONY: init
init:
${DOCKER_COMPOSE} run --rm app fogger:init
.PHONY: run
run:
${DOCKER_COMPOSE} run --rm app fogger:run
.PHONY: finish
finish:
${DOCKER_COMPOSE} run --rm app fogger:finish