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] |
| 18 | commands = flake8 {posargs} |
| 19 | |
| 20 | [testenv:venv] |
| 21 | commands = {posargs} |
| 22 | |
| 23 | [testenv:cover] |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 24 | setenv = |
| 25 | {[testenv]setenv} |
| 26 | PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode |
| 27 | whitelist_externals = |
| 28 | find |
| 29 | commands = |
| 30 | find octavia_tempest_plugin -type f -name "*.pyc" -delete |
| 31 | coverage erase |
| 32 | stestr run {posargs} |
| 33 | coverage combine |
| 34 | coverage html -d cover |
| 35 | coverage xml -o cover/coverage.xml |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 36 | |
| 37 | [testenv:docs] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 38 | deps = |
| 39 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} |
| 40 | -r{toxinidir}/requirements.txt |
| 41 | -r{toxinidir}/doc/requirements.txt |
| 42 | whitelist_externals = rm |
| 43 | commands = |
| 44 | rm -rf doc/build |
| 45 | sphinx-build -W -b html doc/source doc/build/html |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 46 | |
| 47 | [testenv:releasenotes] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 48 | deps = |
| 49 | -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} |
| 50 | -r{toxinidir}/requirements.txt |
| 51 | -r{toxinidir}/doc/requirements.txt |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 52 | commands = |
| 53 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 54 | |
| 55 | [testenv:debug] |
| 56 | commands = oslo_debug_helper {posargs} |
| 57 | |
| 58 | [flake8] |
| 59 | # E123, E125 skipped as they are invalid PEP-8. |
| 60 | |
| 61 | show-source = True |
| 62 | ignore = E123,E125 |
| 63 | builtins = _ |
| 64 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 65 | |
| 66 | [testenv:genconfig] |
| 67 | whitelist_externals = mkdir |
| 68 | commands = |
| 69 | mkdir -p etc |
| 70 | oslo-config-generator --output-file etc/octavia.tempest.conf.sample \ |
| 71 | --namespace tempest.config |