blob: 4a61222e6e9d80e71e1ce853b5d2e7c7e1f7cc1b [file] [log] [blame]
Michael Johnson34139b02017-03-15 10:31:10 -07001[tox]
2minversion = 2.0
Carlos Goncalves436dd9f2019-02-12 22:08:00 +01003envlist = pep8
Michael Johnson34139b02017-03-15 10:31:10 -07004skipsdist = True
5
6[testenv]
7usedevelop = True
Michael Johnsonf298ed02019-06-28 16:00:38 -07008install_command = pip install {opts} {packages}
Michael Johnson34139b02017-03-15 10:31:10 -07009setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
Michael Johnsonf298ed02019-06-28 16:00:38 -070012deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
13 -r{toxinidir}/test-requirements.txt
Michael Johnson0f28a482018-05-23 16:22:45 -070014commands =
15 stestr run {posargs}
16 stestr slowest
Michael Johnson34139b02017-03-15 10:31:10 -070017
18[testenv:pep8]
huang.zhipingce50c732018-06-09 18:52:30 +080019basepython = python3
Brian Haley0ae7f102020-03-20 11:14:44 -040020commands = flake8
Michael Johnson34139b02017-03-15 10:31:10 -070021
22[testenv:venv]
huang.zhipingce50c732018-06-09 18:52:30 +080023basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070024commands = {posargs}
25
26[testenv:cover]
huang.zhipingce50c732018-06-09 18:52:30 +080027basepython = python3
Michael Johnson0f28a482018-05-23 16:22:45 -070028setenv =
29 {[testenv]setenv}
30 PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode
31whitelist_externals =
32 find
33commands =
34 find octavia_tempest_plugin -type f -name "*.pyc" -delete
35 coverage erase
36 stestr run {posargs}
37 coverage combine
38 coverage html -d cover
39 coverage xml -o cover/coverage.xml
Michael Johnson34139b02017-03-15 10:31:10 -070040
41[testenv:docs]
huang.zhipingce50c732018-06-09 18:52:30 +080042basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070043deps =
Michael Johnsonf298ed02019-06-28 16:00:38 -070044 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Jude Cross986e3f52017-07-24 14:57:20 -070045 -r{toxinidir}/requirements.txt
46 -r{toxinidir}/doc/requirements.txt
47whitelist_externals = rm
48commands =
49 rm -rf doc/build
50 sphinx-build -W -b html doc/source doc/build/html
Michael Johnson34139b02017-03-15 10:31:10 -070051
Michael Johnson791fefb2019-09-13 10:48:05 -070052[testenv:pdf-docs]
53basepython = python3
54deps = {[testenv:docs]deps}
55whitelist_externals =
56 make
57 rm
58commands =
59 rm -rf doc/build/pdf
60 sphinx-build -W -b latex doc/source doc/build/pdf
61 make -C doc/build/pdf
62
Michael Johnson34139b02017-03-15 10:31:10 -070063[testenv:releasenotes]
huang.zhipingce50c732018-06-09 18:52:30 +080064basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070065deps =
Michael Johnsonf298ed02019-06-28 16:00:38 -070066 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Jude Cross986e3f52017-07-24 14:57:20 -070067 -r{toxinidir}/requirements.txt
68 -r{toxinidir}/doc/requirements.txt
Michael Johnson34139b02017-03-15 10:31:10 -070069commands =
70 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
71
72[testenv:debug]
huang.zhipingce50c732018-06-09 18:52:30 +080073basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070074commands = oslo_debug_helper {posargs}
75
76[flake8]
Michael Johnson34139b02017-03-15 10:31:10 -070077show-source = True
Michael Johnson34139b02017-03-15 10:31:10 -070078builtins = _
79exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Brian Haley0ae7f102020-03-20 11:14:44 -040080import-order-style = pep8
81# [H106]: Don't put vim configuration in source files
82# [H203]: Use assertIs(Not)None to check for None
83# [H204]: Use assert(Not)Equal to check for equality
84# [H205]: Use assert(Greater|Less)(Equal) for comparison
85# [H904]: Delay string interpolations at logging calls
86enable-extensions=H106,H203,H204,H205,H904
Jude Cross986e3f52017-07-24 14:57:20 -070087
88[testenv:genconfig]
huang.zhipingce50c732018-06-09 18:52:30 +080089basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070090whitelist_externals = mkdir
91commands =
92 mkdir -p etc
93 oslo-config-generator --output-file etc/octavia.tempest.conf.sample \
94 --namespace tempest.config