forked from Yelp/Tron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
91 lines (83 loc) · 2.97 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]
envlist = py36
tox_pip_extensions_ext_venv_update = true
[testenv]
basepython = python3.6
deps =
--requirement={toxinidir}/requirements.txt
--requirement={toxinidir}/requirements-dev.txt
usedevelop = true
passenv = USER
setenv =
YARN_REGISTRY = {env:NPM_CONFIG_REGISTRY:https://registry.npmjs.org/}
whitelist_externals=
yarn
commands =
# we have a pre-commit hook that runs eslint over our FE files, but our
# current setup means that the necessary binaries won't be installed
# automatically, so we manually invoke yarn to install things
yarn install
pre-commit install -f --install-hooks
pre-commit run --all-files
# tron has been around for a while, so we'll need to slowly add types or make an effort
# to get it mypy-clean in one shot - until then, let's only check files that we've added types to
mypy --pretty tron/kubernetes.py tron/commands/backfill.py bin/tronctl tron/utils/scribereader.py
check-requirements
# optionally install yelpy requirements - this is after check-requirements since
# check-requirements doesn't understand these extra requirements
-pip install -r yelp_package/extra_requirements_yelp.txt
# we then run tests at the very end so that we can run tests with yelpy requirements
py.test -s {posargs:tests}
[flake8]
ignore = E501,E265,E241,E704,E251,W504,E231,W503,E203
[testenv:docs]
deps =
--requirement={toxinidir}/requirements-docs.txt
whitelist_externals=
mkdir
commands=
mkdir -p docs
sphinx-build -b html -d docs/_build docs docs/_build/html
[testenv:example-cluster]
whitelist_externals=docker-compose
deps=
docker-compose
commands=
docker-compose -f example-cluster/docker-compose.yml build playground
docker-compose -f example-cluster/docker-compose.yml run -p 8089:8089 playground
docker-compose -f example-cluster/docker-compose.yml down
[testenv:itest]
commands =
make deb_bionic
make _itest_bionic
[testenv:cluster_itests]
changedir=cluster_itests/
passenv = DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
whitelist_externals =
/bin/bash
deps =
docker-compose
commands =
docker-compose down
docker-compose build
docker-compose up -d mesosmaster mesosslave tronmaster
bash -c "docker-compose run --rm tronmaster tox -i {env:PIP_INDEX_URL:https://pypi.python.org/simple} -e tron_itests_inside_container -- --no-capture {posargs} || (docker-compose logs && exit 1)"
docker-compose stop
docker-compose rm --force
[testenv:tron_itests_inside_container]
basepython = python3.6
changedir=cluster_itests/
deps =
{[testenv]deps}
behave==1.2.5
whitelist_externals =
/bin/mkdir
commands =
# TODO: upgrade behave if they ever take this reasonable PR
pip install git+https://github.com/Yelp/behave@1.2.5-issue_533-fork
behave {posargs}
[testenv:trond_inside_container]
basepython = python3.6
deps = {[testenv]deps}
commands =
trond --debug -c /work/cluster_itests/config/ -l /work/example-cluster/logging.conf -H 0.0.0.0