tox.ini 1.55 KB
Newer Older
Monty Taylor's avatar
Monty Taylor committed
1
[tox]
Dirk Mueller's avatar
Dirk Mueller committed
2
minversion = 2.0
Stephen Finucane's avatar
Stephen Finucane committed
3
envlist = py{27,35,36},pep8,docs
Monty Taylor's avatar
Monty Taylor committed
4 5

[testenv]
6
usedevelop = True
7
install_command = pip install {opts} {packages}
8
passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE
9
deps =
Stephen Finucane's avatar
Stephen Finucane committed
10 11 12
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
Monty Taylor's avatar
Monty Taylor committed
13 14

[testenv:pep8]
qingszhao's avatar
qingszhao committed
15
basepython = python3
16
commands = flake8 {posargs}
Monty Taylor's avatar
Monty Taylor committed
17

Doug Hellmann's avatar
Doug Hellmann committed
18
[testenv:docs]
qingszhao's avatar
qingszhao committed
19
basepython = python3
Stephen Finucane's avatar
Stephen Finucane committed
20
deps = -r{toxinidir}/doc/requirements.txt
Doug Hellmann's avatar
Doug Hellmann committed
21 22
commands = python setup.py build_sphinx

23
[testenv:releasenotes]
qingszhao's avatar
qingszhao committed
24
basepython = python3
Stephen Finucane's avatar
Stephen Finucane committed
25
deps = -r{toxinidir}/doc/requirements.txt
26 27 28
commands =
  rm -rf releasenotes/build
  sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html
29

Monty Taylor's avatar
Monty Taylor committed
30
[testenv:venv]
qingszhao's avatar
qingszhao committed
31
basepython = python3
Monty Taylor's avatar
Monty Taylor committed
32
commands = {posargs}
Monty Taylor's avatar
Monty Taylor committed
33

34 35 36 37 38 39 40 41 42 43
[testenv:cover]
basepython = python3
setenv =
  PYTHON=coverage run --source pbr --parallel-mode
commands =
  stestr run {posargs}
  coverage combine
  coverage html -d cover
  coverage xml -o cover/coverage.xml

Monty Taylor's avatar
Monty Taylor committed
44
[flake8]
45 46 47
# H405  multi line docstring summary not separated with an empty line
# H904 "Wrap lines in parentheses and not a backslash for line continuation
# Removed in current hacking (https://review.openstack.org/#/c/101701/).
Luo Gangyi's avatar
Luo Gangyi committed
48
ignore = H803,H904
49
exclude = .venv,.tox,dist,doc,*.egg,build
Monty Taylor's avatar
Monty Taylor committed
50
show-source = true
51 52 53 54 55 56

[testenv:lower-constraints]
basepython = python3
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt