This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
/
tox.ini
64 lines (58 loc) · 1.93 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
[tox]
envlist = py{37,38}-unittest, py{37,38}-kafka{10,11}-dockeritest
# the Github actions override the index server for our CI builds
# The Makefile also sets PIP_INDEX_URL to the public PyPI 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
[testenv]
deps =
-rrequirements-dev.txt
dockeritest: docker-compose==1.7.0
whitelist_externals = /bin/bash
passenv = ITEST_PYTHON_FACTOR KAFKA_VERSION ACCEPTANCE_TAGS
setenv =
py37: ITEST_PYTHON_FACTOR = py37
py38: ITEST_PYTHON_FACTOR = py38
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: pre-commit run --all-files
unittest: py.test -s {posargs}
unittest: flake8 .
unittest: mypy kafka_utils/
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]
basepython = python3.8
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