forked from cdent/gabbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
103 lines (85 loc) · 2.53 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]
minversion = 3.1.1
skipsdist = True
envlist = pep8,py37,py38,py39,py310,pypy3,pep8,limit,failskip,docs,py39-prefix,py39-limit,py39-verbosity,py39-failskip,py36-pytest,py37-pytest,py38-pytest,py39-pytest,py310-pytest
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = rm
usedevelop = True
install_command = pip install --no-cache -U {opts} {packages}
commands =
stestr run {posargs}
setenv = GABBI_PREFIX=
passenv = GABBI_* HOME
[testenv:venv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[testenv:py36-pytest]
commands = py.test gabbi
[testenv:py37-pytest]
commands = py.test gabbi
[testenv:py38-pytest]
commands = py.test gabbi
[testenv:py39-pytest]
commands = py.test gabbi
[testenv:py310-pytest]
commands = py.test gabbi
[testenv:py39-prefix]
setenv = GABBI_PREFIX=/snoopy
[testenv:pep8]
basepython = python3
deps = hacking
commands =
flake8
[testenv:py39-limit]
commands = {toxinidir}/test-limit.sh
[testenv:py39-verbosity]
commands = {toxinidir}/test-verbosity.sh
[testenv:py39-failskip]
commands = {toxinidir}/test-failskip.sh
# Use pytest when in pypy3 because stestr fails on loading readline.
[testenv:pypy3]
commands = py.test gabbi
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source gabbi --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:pytest-cov]
basepython = python3
commands = py.test --cov=gabbi gabbi/tests --cov-config .coveragerc --cov-report html
[testenv:placement]
basepython = python3.9
deps = tox
commands = -mkdir {envdir}/src
-rm -r {envdir}/src/*
bash -c "curl -L https://tarballs.opendev.org/openstack/placement/placement-master.tar.gz | tar -C {envdir}/src -zx --strip-components 1 -f - "
tox -c {envdir}/src -e functional-py39 --notest # ensure a virtualenv is built
# placement shares tox envs so use the named shared env
{envdir}/src/.tox/py39/bin/pip install -U {toxinidir} # install gabbi
tox -c {envdir}/src -e functional-py39 test_api
whitelist_externals =
mkdir
curl
tar
rm
bash
[testenv:docs]
commands =
rm -rf doc/build
python setup.py build_sphinx
whitelist_externals =
rm
[flake8]
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,docs
show-source = True