-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 808 Bytes
/
Copy pathMakefile
File metadata and controls
43 lines (33 loc) · 808 Bytes
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
NAME := osakunta/python-template
TAG := $$(git log -1 --pretty=%h)
IMAGE := ${NAME}:${TAG}
LATEST := ${NAME}:latest
EXEC := python-template
docker-build:
sudo docker build -t ${IMAGE} .
sudo docker tag ${IMAGE} ${LATEST}
docker-run:
sudo docker run -it --name ${EXEC} ${LATEST}
docker-rm:
sudo docker rm ${EXEC}
docker-push:
sudo docker push ${NAME}
docker-sh:
sudo docker exec -it ${EXEC} /bin/sh
run:
@python -m src
test:
ENV=test python -m unittest
test-coverage:
ENV=test coverage run -m unittest
test-coverage-upload:
ENV=test coverage run -m unittest
coverage xml
python-codacy-coverage -r coverage.xml
dev-install:
sudo apt update
sudo apt install -y python3.7
virtualenv --python=/usr/bin/python3.7 venv
. venv/bin/activate
pip install pipenv
pipenv install --dev