-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathtox.ini
More file actions
83 lines (75 loc) · 2.18 KB
/
tox.ini
File metadata and controls
83 lines (75 loc) · 2.18 KB
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
[tox]
# We can't bump minversion yet since we need to support Python 2.7, and
# tox 4.x requires Python 3.7+
minversion = 3.18.0
envlist = pep8,py3,docs
[testenv]
usedevelop = true
passenv =
PBR_INTEGRATION
PIPFLAGS
PIPVERSION
PBRVERSION
REPODIR
WHEELHOUSE
PROJECTS
setenv =
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1}
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
# NOTE(stephenfin): pbr intentionally does not use constraints since we support
# a broader range of Python versions than OpenStack as a whole
deps =
-r{toxinidir}/test-requirements.txt
commands =
stestr run --serial --suppress-attachments {posargs}
# The latest pip that supports python3.6 assumes that pep660 editable
# wheel installations should be used for development installs when the
# project has a pyproject.toml file. Unfortunately, the latest setuptools
# that supports python3.6 does not support pep660. This means the combo
# breaks under python3.6. Workaround the problem by disabling development
# installs for this version of python.
[testenv:py36]
usedevelop = false
[testenv:pep8]
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:docs]
usedevelop = false
allowlist_externals =
rm
deps =
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build doc/source/reference/api
sphinx-build -W -b html doc/source doc/build/html {posargs}
[testenv:releasenotes]
allowlist_externals =
rm
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source pbr --parallel-mode
commands =
stestr run --serial --suppress-attachments {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
# E203 (conflicts with black)
# E501 (conflicts with black)
# W503 (conflicts with black)
# H216 (we use mock for python2.7 compatibility)
ignore = E203,E501,W503,H216
exclude = .venv,.tox,dist,doc,*.egg,build
show-source = true
per-file-ignores =
pbr/_compat/easy_install.py:H404,H405