Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 2.0 |
Carlos Goncalves | 436dd9f | 2019-02-12 22:08:00 +0100 | [diff] [blame] | 3 | envlist = pep8 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 4 | skipsdist = True |
| 5 | |
| 6 | [testenv] |
| 7 | usedevelop = True |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 8 | install_command = pip install {opts} {packages} |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 9 | setenv = |
| 10 | VIRTUAL_ENV={envdir} |
| 11 | PYTHONWARNINGS=default::DeprecationWarning |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 12 | deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
| 13 | -r{toxinidir}/test-requirements.txt |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 14 | commands = |
| 15 | stestr run {posargs} |
| 16 | stestr slowest |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 17 | |
| 18 | [testenv:pep8] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 19 | basepython = python3 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 20 | commands = flake8 {posargs} |
| 21 | |
| 22 | [testenv:venv] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 23 | basepython = python3 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 24 | commands = {posargs} |
| 25 | |
| 26 | [testenv:cover] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 27 | basepython = python3 |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 28 | setenv = |
| 29 | {[testenv]setenv} |
| 30 | PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode |
| 31 | whitelist_externals = |
| 32 | find |
| 33 | commands = |
| 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 Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 40 | |
| 41 | [testenv:docs] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 42 | basepython = python3 |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 43 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 44 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 45 | -r{toxinidir}/requirements.txt |
| 46 | -r{toxinidir}/doc/requirements.txt |
| 47 | whitelist_externals = rm |
| 48 | commands = |
| 49 | rm -rf doc/build |
| 50 | sphinx-build -W -b html doc/source doc/build/html |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 51 | |
| 52 | [testenv:releasenotes] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 53 | basepython = python3 |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 54 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 55 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 56 | -r{toxinidir}/requirements.txt |
| 57 | -r{toxinidir}/doc/requirements.txt |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 58 | commands = |
| 59 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 60 | |
| 61 | [testenv:debug] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 62 | basepython = python3 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 63 | commands = oslo_debug_helper {posargs} |
| 64 | |
| 65 | [flake8] |
| 66 | # E123, E125 skipped as they are invalid PEP-8. |
| 67 | |
| 68 | show-source = True |
| 69 | ignore = E123,E125 |
| 70 | builtins = _ |
| 71 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 72 | |
| 73 | [testenv:genconfig] |
huang.zhiping | ce50c73 | 2018-06-09 18:52:30 +0800 | [diff] [blame] | 74 | basepython = python3 |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 75 | whitelist_externals = mkdir |
| 76 | commands = |
| 77 | mkdir -p etc |
| 78 | oslo-config-generator --output-file etc/octavia.tempest.conf.sample \ |
| 79 | --namespace tempest.config |