-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (23 loc) · 969 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
export COMPOSE_DOCKER_CLI_BUILD = 1
export DOCKER_BUILDKIT = 1
include .env
all: down build unit-tests integration-tests e2e-tests
build:
docker-compose build
up:
docker-compose up -d app
down:
docker-compose down -v --remove-orphans
logs:
docker-compose logs --tail=25 api redis_pubsub
test: unit-tests integration-tests e2e-tests
unit-tests:
docker-compose run --rm --no-deps --name unit_tests --entrypoint="pytest /tests/unit -vv" tests
integration-tests: up restart-db
docker-compose run --rm --no-deps --name integration_tests --entrypoint="pytest /tests/integration -vv" tests
e2e-tests: up restart-db
docker-compose run --rm --no-deps --name e2e-tests --entrypoint="pytest /tests/e2e -vv" tests
restart-db:
-docker exec -it architecture-patterns-db psql -d warehouse -U allocation -c "drop table allocation; drop table batch; drop table order_line; drop table product; drop table allocation_view;"
black:
black -l 86 $$(find * -name '*.py')