-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
76 lines (61 loc) · 1.98 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
[tox]
envlist = py39,lint, lint-cython, lint-types, black, docs
minversion = 3.2.1
isolated_build = true
[testenv]
setenv =
cov: CYTHON_TEST_MACROS=1
passenv =
DPKG_DISTRO_DEV_ROOT,
PKG_CONFIG_PATH,
PKG_CONFIG_SYSROOT_DIR,
PKG_CONFIG
BMQ_BROKER_URI
whitelist_externals = make
deps =
pip>=19.0.3
-rrequirements-test.txt
commands =
{basepython} -c 'import sys; print("\n".join(sys.path))'
make PYTEST_ARGS='-vvv --showlocals --color=yes {posargs} --junit-xml={toxworkdir}/{envname}_integration.xml ' check
commands_cov = {basepython} -m pytest -v --timeout=30 --cov --cov-report=term --cov-fail-under=100 --cov-append --junitxml={toxworkdir}/{envname}_integration.xml --cov-report=xml:{toxworkdir}/coverage.xml
description =
Run tests under {basepython}
cov: with coverage
[testenv:.package]
description = Isolated build environment
basepython = python3.9
[testenv:py39-cov]
usedevelop = True
commands = {[testenv]commands_cov}
deps = -rrequirements-test-coverage.txt
[testenv:lint]
description = Run lint checker on Python files
basepython = python3.9
deps = flake8
skip_install = true
commands = {basepython} -m flake8 --config={toxinidir}/.flake8 src
[testenv:lint-cython]
description = Run lint checker on Cython files
basepython = python3.9
deps = flake8
skip_install = true
commands = {basepython} -m flake8 --config={toxinidir}/.flake8.cython src
[testenv:lint-types]
description = Run mypy checker on examples
basepython = python3.9
deps =
mypy
commands = {basepython} -m mypy --strict examples
[testenv:black]
description = Check that python files are formatted with black
basepython = python3.9
deps = black
skip_install = true
commands = {basepython} -m black --check --verbose src tests
[testenv:docs]
description = Generate library documentation
basepython = python3.9
deps = -rrequirements-lint-docs.txt
commands = make -C docs html
{basepython} -c 'print("documentation available under file://{toxworkdir}/docs_out/index.html")'