-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
46 lines (40 loc) · 1.25 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
[tox]
envlist = pep8, py310, functional, cover
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/nectar_tools
commands =
stestr run '{posargs}'
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:functional]
# This will use whatever 'basepython' is set to, so the name is ambiguous.
setenv = OS_TEST_PATH={toxinidir}/nectar_tools/tests/functional
[testenv:pep8]
description = Run style checks.
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[flake8]
show-source = True
select = H,O
# H404 Docstrings don't always start with a newline
# H405 Multiline docstrings are okay
ignore = H301,H403,H404,H405
import-order-style = pep8
application-import-names = nectar_tools
[testenv:cover]
allowlist_externals = sh
setenv =
{[testenv]setenv}
PYTHON=coverage run --source nectar_tools --parallel-mode
commands =
coverage erase
sh -c 'OS_TEST_PATH={toxinidir}/nectar_tools/tests/ stestr run {posargs}'
coverage combine
# Generate a new HTML report with the combined results
# otherwise the HTML report will only show partial results
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --fail-under=90 --skip-covered