forked from Yelp/paasta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
91 lines (80 loc) · 2.65 KB
/
tox.ini
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[tox]
skipsdist=True
envlist = py27
indexserver =
default = https://pypi.python.org/simple
private = https://pypi.yelpcorp.com/simple
[testenv]
basepython = python2.7
setenv=
TZ = UTC
deps =
--requirement={toxinidir}/requirements-dev.txt
--editable={toxinidir}
commands =
py.test {posargs:tests}
[testenv:coverage]
commands =
python -m pytest --cov-config .coveragerc --cov=paasta_tools --cov-report=term-missing --cov-report=html -s {posargs:tests}
[testenv:docs]
commands =
/bin/rm -rf docs/source/generated/
# The last arg to apidoc is a list of excluded paths
sphinx-apidoc -f -e -o docs/source/generated/ paasta_tools
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
[testenv:manpages]
commands = ./build-manpages.sh
[testenv:paasta_itests]
changedir=paasta_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
docker-compose==1.7.1
commands =
docker-compose pull
docker-compose --verbose build
# Fire up the marathon cluster in background
docker-compose up -d mesosmaster mesosslave marathon chronos hacheck
docker-compose scale mesosslave=3
# Run the paastatools container in foreground to catch the output
# the `docker-compose run` vs `docker-compose up` is important here, as docker-compose run will
# exit with the right code.
#
# dnephin says we need the --rm otherwise these containers won't be cleaned
# up. I guess we only need this for run'd containers, not up'd containers?
# IDK, the docs don't really specify.
docker-compose run --rm paastatools tox -e paasta_itests_inside_container -- --no-capture {posargs}
docker-compose stop
docker-compose rm --force
[testenv:paasta_itests_inside_container]
envdir=/tmp/
setenv =
DOCKER_COMPOSE_PROJECT_NAME = paastatools_inside_container
changedir=paasta_itests/
deps =
{[testenv]deps}
behave==1.2.4
behave-pytest==0.1.1
# This .whl is created in yelp_package/dockerfiles/trusty/Dockerfile
/root/mesos.executor-1.0.1-py27-none-any.whl
/root/mesos.scheduler-1.0.1-py27-none-any.whl
/root/mesos.native-1.0.1-py27-none-any.whl
commands =
python -m behave {posargs}
[testenv:general_itests]
setenv =
PAASTA_SYSTEM_CONFIG_DIR = {toxinidir}/general_itests/fake_etc_paasta
changedir=general_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
{[testenv]deps}
behave==1.2.4
behave-pytest==0.1.1
commands =
pre-commit install -f --install-hooks
pre-commit run --all-files
pylint -E paasta_tools/mesos/ --ignore master.py,task.py
python -m behave {posargs}
[flake8]
max-line-length = 120
[pep8]
ignore = E265,E309,E501