-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
70 lines (50 loc) · 1.49 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
help:
@echo "help -- print this help"
@echo "start -- start docker stack"
@echo "stop -- stop docker stack"
@echo "ps -- show status"
@echo "build -- build image"
@echo "clean -- clean all artifacts"
@echo "test -- run tests using docker"
@echo "dockershell -- run bash inside docker"
build:
docker-compose build pyme
start:
docker-compose up -d pyme
logs:
docker-compose logs -f --tail=30 pyme
up:
docker-compose up pyme
stop:
docker-compose stop
ps:
docker-compose ps
clean: stop
docker-compose rm --force -v
only_test:
docker-compose run --rm pyme pytest -s --disable-pytest-warnings
covered_test:
docker-compose run --rm pyme pytest --cov=. --cov-config setup.cfg --disable-pytest-warnings
bandit:
docker-compose run --rm pyme bandit -s B101 . -r
pep8:
docker-compose run --rm pyme flake8
test: pep8 bandit covered_test
dockershell:
docker-compose run --rm pyme /bin/bash
shell_plus:
docker-compose run --rm pyme ipython --ipython-dir=.ipython
main:
docker-compose run --rm pyme python __main__.py
token:
docker-compose run --rm pyme python server.py
only_travis_test:
docker-compose -f docker-compose.travis.yml run --rm pyme pytest --cov=. --cov-config setup.cfg --disable-pytest-warnings
travis-test: pep8 only_travis_test
clean-python:
rm -fr build
rm -fr dist
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
.PHONY: help start stop ps clean test dockershell shell_plus only_test pep8 clean-python