forked from apache/libcloud
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
103 lines (93 loc) · 3.2 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
94
95
96
97
98
99
100
101
102
103
[tox]
envlist = py{3.6,3.7,3.8},checks,lint,pylint,integration,coverage,coverage-ci
skipsdist = true
requires =
wheel
[testenv]
passenv = TERM CI GITHUB_* DOCKER_*
deps =
-r{toxinidir}/requirements-tests.txt
pyopenssl
lockfile
libvirt-python==6.2.0
py3.7: setuptools==41.6.0
py3.8: setuptools==41.6.0
basepython =
{checks,lint,pylint,coverage,docs}: python3.6
py3.6: python3.6
py3.7: python3.7
py3.8: python3.8
setenv =
CRYPTOGRAPHY_ALLOW_OPENSSL_102=1
# NOTE: By default we run tests on CI in parallel to speed up the build
# To avoid per-test function process safety issues we run all tests in a single
# file in the same worker process.
# python setup.py test
# NOTE: tee-sys is not supported by pytest which still supports Python 3.5
# pytest -rsx -vvv -o log_cli=True --durations=10 -n auto --dist loadfile
commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
pytest -rsx -vvv --capture=tee-sys -o log_cli=True --durations=10 -n auto --dist loadfile --ignore libcloud/test/benchmarks/
whitelist_externals = cp
bash
echo
scripts/*.sh
[testenv:pylint]
deps = -r{toxinidir}/requirements-tests.txt
backports.ssl_match_hostname
bottle
lockfile
setenv =
PYTHONPATH={toxinidir}
commands = pylint -E --rcfile=./.pylintrc libcloud/common/
pylint -E --rcfile=./.pylintrc libcloud/container/
pylint -E --rcfile=./.pylintrc libcloud/backup/
pylint -E --rcfile=./.pylintrc libcloud/dns/
pylint -E --rcfile=./.pylintrc libcloud/storage/
pylint -E --rcfile=./.pylintrc libcloud/utils/
pylint -E --rcfile=./.pylintrc demos/
pylint -E --rcfile=./.pylintrc contrib/
[testenv:lint]
deps = -r{toxinidir}/requirements-tests.txt
backports.ssl_match_hostname
lockfile
rstcheck
commands = flake8 libcloud/
flake8 --max-line-length=160 libcloud/test/
flake8 demos/
flake8 integration/
flake8 --ignore=E402,E902 docs/examples/
flake8 --ignore=E402,E902 --max-line-length=160 contrib/
python -mjson.tool libcloud/data/pricing.json /dev/null
rstcheck --report warning README.rst
rstcheck --report warning CHANGES.rst
rstcheck --report warning CONTRIBUTING.rst
[testenv:checks]
commands = bash ./scripts/check_file_names.sh
[testenv:integration]
deps = -r{toxinidir}/integration/requirements.txt
commands = python -m integration
[testenv:coverage]
deps =
-r{toxinidir}/requirements-tests.txt
paramiko==2.8.0
python-dateutil
libvirt-python==6.2.0
fasteners
pyopenssl
setenv =
CRYPTOGRAPHY_ALLOW_OPENSSL_102=1
commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
coverage run --source=libcloud setup.py test
[testenv:coverage-ci]
passenv = TERM TOXENV CI GITHUB_*
deps =
-r{toxinidir}/requirements-tests.txt
paramiko==2.8.0
libvirt-python==6.2.0
fasteners
pyopenssl
setenv =
CRYPTOGRAPHY_ALLOW_OPENSSL_102=1
commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
coverage run --source=libcloud setup.py test
codecov