-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
93 lines (82 loc) · 2.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
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
92
93
[tox]
skipsdist = True
envlist = pep8,py3
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
CHARM_DIR={envdir}
install_command =
pip install {opts} {packages}
commands = stestr run --slowest {posargs}
passenv = HOME TERM CS_* OS_* TEST_*
deps = -r{toxinidir}/requirements-dev.txt
[testenv:build]
basepython = python3
deps = -r{toxinidir}/build-requirements.txt
commands =
charmcraft -v build
[testenv:py3]
basepython = python3
setenv = PYTHONPATH={toxinidir}/src
deps = -r{toxinidir}/requirements-dev.txt
commands = stestr run --slowest {posargs}
[testenv:py35]
basepython = python3.5
setenv = PYTHONPATH={toxinidir}/src
deps = -r{toxinidir}/requirements-dev.txt
commands = stestr run --slowest {posargs}
[testenv:py36]
basepython = python3.6
setenv = PYTHONPATH={toxinidir}/src
deps = -r{toxinidir}/requirements-dev.txt
commands = stestr run --slowest {posargs}
[testenv:py37]
basepython = python3.7
setenv = PYTHONPATH={toxinidir}/src
deps = -r{toxinidir}/requirements-dev.txt
commands = stestr run --slowest {posargs}
[testenv:py38]
basepython = python3.8
setenv = PYTHONPATH={toxinidir}/src
deps = -r{toxinidir}/requirements-dev.txt
commands = stestr run --slowest {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:pep8]
basepython = python3
setenv = PYTHONPATH={toxinidir}/src
# Charmcraft builds with requirements-dev instead of test-requirements
deps = -r{toxinidir}/requirements-dev.txt
commands = flake8 {posargs} src unit_tests
[testenv:cover]
# Technique based heavily upon
# https://github.com/openstack/nova/blob/master/tox.ini
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
setenv =
{[testenv]setenv}
PYTHON=coverage run
PYTHONPATH={toxinidir}/src
commands =
coverage erase
stestr run --slowest {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[coverage:run]
branch = True
concurrency = multiprocessing
parallel = True
source =
.
omit =
.tox/*
*/charmhelpers/*
unit_tests/*