-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (36 loc) · 1.37 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
PROJECT_NAME=nyquist
PEP8_CONFIG_FILE=.flake8
DOCS_DOCKERFILE=.gci/Dockerfile.docs
DOCS_IMAGE=${PROJECT_NAME}_docs_image
DEV_DOCKERFILE=.gci/Dockerfile.dev
DEV_IMAGE=${PROJECT_NAME}_dev_image
PEP8_DOCKER_IMAGE=pipelinecomponents/flake8
DEV_CONTAINER=control_lab_client_dev
DOCKER=docker run -it --rm
pep8:
${DOCKER} -v $(PWD):/project -w /project ${PEP8_DOCKER_IMAGE} flake8 --config $(PEP8_CONFIG_FILE) .
build_docs:
docker build -f ${DOCS_DOCKERFILE} -t ${DOCS_IMAGE} .
docs: build_docs
${DOCKER} -v $(PWD):/project -w /project/docs ${DOCS_IMAGE}
build_dev:
docker build -f ${DEV_DOCKERFILE} -t ${DEV_IMAGE} .
run_dev: build_dev
docker run -dit -v $(PWD):/project -w /project --name ${DEV_CONTAINER} ${DEV_IMAGE} bash
try: run_dev
- docker exec -it ${DEV_CONTAINER} bash
docker stop ${DEV_CONTAINER}
docker rm ${DEV_CONTAINER}
test: run_dev
docker exec ${DEV_CONTAINER} pip3 install .
docker exec ${DEV_CONTAINER} pip3 install coverage
- docker exec -it ${DEV_CONTAINER} coverage run --source=/usr/local/lib/python3.8/site-packages/nyquist -m unittest discover -v tests/
- docker exec -it ${DEV_CONTAINER} coverage report
- docker exec -it ${DEV_CONTAINER} coverage html
docker stop ${DEV_CONTAINER}
docker rm ${DEV_CONTAINER}
stop:
docker stop ${DEV_CONTAINER}
clean:
docker rm ${DEV_CONTAINER}
.PHONY: pep8 build_docs docs build_dev run_dev try test stop clean