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