-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 1.18 KB
/
Makefile
File metadata and controls
37 lines (28 loc) · 1.18 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
.PHONY: test test-sqlite test-mysql test-all build build-mysql up down
# Service and tooling
DOCKER_COMPOSE ?= docker compose
APP_SERVICE ?= app
APP_SERVICE_MYSQL ?= app-mysql
# Usage:
# make test # run full suite on SQLite (default)
# make test-sqlite # explicit SQLite run
# make test-mysql # run suite on MySQL service
# make test-all # run both SQLite and MySQL suites
# make build # build app image
# make up # start backing services (redis, mysql)
# make down # stop all services
test:
$(DOCKER_COMPOSE) run --rm $(APP_SERVICE) vendor/bin/phpunit --no-coverage $(ARGS)
test-sqlite:
$(DOCKER_COMPOSE) run --rm $(APP_SERVICE) vendor/bin/phpunit --no-coverage $(ARGS)
test-mysql:
$(DOCKER_COMPOSE) run --rm $(APP_SERVICE_MYSQL) vendor/bin/phpunit --no-coverage $(ARGS)
test-all:
$(DOCKER_COMPOSE) run --rm $(APP_SERVICE) vendor/bin/phpunit --no-coverage $(ARGS)
$(DOCKER_COMPOSE) run --rm $(APP_SERVICE_MYSQL) vendor/bin/phpunit --no-coverage $(ARGS)
build:
$(DOCKER_COMPOSE) build $(APP_SERVICE)
up:
$(DOCKER_COMPOSE) up -d redis mysql
down:
$(DOCKER_COMPOSE) down -v