summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 49d0d38b54279706e71ad64d0f5b98ee3e0286c3 (plain)
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
[tox]
minversion = 3.1.0
envlist = py3,pep8
ignore_basepython_conflict = True

[testenv]
basepython = python3
setenv =
  VIRTUAL_ENV={envdir}
  OS_STDOUT_CAPTURE=1
  OS_STDERR_CAPTURE=1
  OS_TEST_TIMEOUT=60
distribute = False
commands =
  stestr run {posargs}
  stestr slowest
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt

[testenv:pep8]
deps =
  -r{toxinidir}/test-requirements.txt
  flake8
commands =
  flake8 cliff doc/source/conf.py setup.py
  # Run security linter
  bandit -c bandit.yaml -r cliff -x tests -n5

[testenv:venv]
# TODO(modred) remove doc/requirements.txt once the openstack-build-sphinx-docs
# job is updated.
deps =
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/doc/requirements.txt
commands = {posargs}

[testenv:neutronclient-tip]
deps = os:openstack/python-neutronclient:python-neutronclient
commands = {toxinidir}/integration-tests/neutronclient-tip.sh {envdir}

[testenv:openstackclient-tip]
deps = os:openstack/python-openstackclient:python-openstackclient
commands = {toxinidir}/integration-tests/openstackclient-tip.sh {envdir}

[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html

[testenv:cover]
setenv =
  {[testenv]setenv}
  PYTHON=coverage run --source cliff --parallel-mode
commands =
  stestr run {posargs}
  coverage combine
  coverage html -d cover
  coverage xml -o cover/coverage.xml