forked from Yelp/paasta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
100 lines (89 loc) · 2.68 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
92
93
94
95
96
97
98
99
100
[tox]
skipsdist=True
envlist = py27
indexserver =
default = https://pypi.python.org/simple
private = https://pypi.yelpcorp.com/simple
[testenv]
setenv=
TZ = UTC
deps =
--requirement={toxinidir}/requirements-dev.txt
--editable={toxinidir}
commands =
py.test -s {posargs:tests}
[testenv:coverage]
setenv=
TZ = UTC
basepython = python2.7
deps =
--requirement={toxinidir}/requirements-dev.txt
--editable={toxinidir}
commands =
python -m pytest --cov-config .coveragerc --cov=paasta_tools --cov-report=term-missing --cov-report=html -s {posargs:tests}
[testenv:docs]
basepython = python2.7
deps =
{[testenv]deps}
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]
basepython = python2.7
deps =
{[testenv]deps}
install_command= pip install {opts} {packages}
commands = ./build-manpages.sh
[testenv:paasta_itests]
basepython = python2.7
changedir=paasta_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
deps =
docker-compose==1.3.0
commands =
docker-compose pull --allow-insecure-ssl
docker-compose --verbose build
# Fire up the marathon cluster in background
docker-compose up -d mesosmaster mesosslave marathon chronos hacheck
# 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]
basepython = python2.7
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
commands =
python -m behave {posargs}
[testenv:general_itests]
setenv =
PAASTA_SYSTEM_CONFIG_DIR = {toxinidir}/general_itests/fake_etc_paasta
basepython = python2.7
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
python -m behave {posargs}
[flake8]
max-line-length = 120
[pep8]
ignore = E265,E309,E501