forked from Yelp/kafka-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
66 lines (58 loc) · 1.91 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
[tox]
envlist = py{27,36}-unittest, py{27,36}-kafka{10,11}-dockeritest
# The Makefile and .travis.yml override the index server to the public one when
# running outside of Yelp.
indexserver =
default = https://pypi.yelpcorp.com/simple
tox_pip_extensions_ext_pip_custom_platform = true
tox_pip_extensions_ext_venv_update = true
[travis]
python =
py27: py27-unittest, py27-kafka{10,11}-dockeritest
py36: py36-unittest, py36-kafka{10,11}-dockeritest
[testenv]
deps =
-rrequirements-dev.txt
dockeritest: docker-compose==1.7.0
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py27: ITEST_PYTHON_FACTOR = py27
py36: ITEST_PYTHON_FACTOR = py36
kafka10: KAFKA_VERSION = 0.10.1.1
kafka10: ACCEPTANCE_TAGS = ~kafka11
kafka11: KAFKA_VERSION = 1.1.0
kafka11: ACCEPTANCE_TAGS =
commands =
unittest: pre-commit install -f --install-hooks
unittest: py.test -s {posargs}
unittest: flake8 .
dockeritest: docker-compose rm --force
dockeritest: docker-compose build
dockeritest: /bin/bash -c " \
dockeritest: docker-compose run \
dockeritest: -e ITEST_PYTHON_FACTOR={env:ITEST_PYTHON_FACTOR} \
dockeritest: -e ACCEPTANCE_TAGS={env:ACCEPTANCE_TAGS} \
dockeritest: itest /scripts/run_tests.sh; exit_status=$?; \
dockeritest: docker-compose stop; \
dockeritest: docker network rm kafkautils_default; \
dockeritest: exit $exit_status"
[testenv:coverage]
deps =
{[testenv]deps}
coverage
commands =
coverage run --source kafka_utils/ -m pytest --strict {posargs}
coverage report -m
flake8 .
[testenv:docs]
deps =
sphinx
sphinx_rtd_theme
changedir = docs
commands = sphinx-build -b html -d build/doctrees source build/html
[flake8]
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,docs,virtualenv_run,.ropeproject
ignore = E501,W605,W504
[pytest]
norecursedirs = .* virtualenv_run