-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (31 loc) · 780 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
35
36
37
38
39
40
41
42
43
define USAGE
A small toy API for executing code in isolated environments.
Commands:
build: Build docker images.
up: Run docker container.
dev: Run both `build` and `up`.
pytest: Test the code.
ssh: SSH into the web container.
endef
export USAGE
help:
@echo "$$USAGE"
build:
docker-compose build
up:
docker-compose up --force-recreate --renew-anon-volumes
up-detached:
docker-compose up --force-recreate --renew-anon-volumes -d
dev:
make build
make up
dev-detached:
make build
make up-detached
pytest:
docker exec cli_api_web_1 pytest $(test_loc)
pytest-cov:
docker exec cli_api_web_1 pytest --cov-report xml:cov.xml --cov=cli_api tests/
docker cp cli_api_web_1:/app/cov.xml .
ssh:
docker exec -it cli_api_web_1 /bin/bash