Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 1 | [tox] |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame^] | 2 | minversion = 3.1 |
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 |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame^] | 5 | ignore_basepython_conflict = True |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 6 | |
| 7 | [testenv] |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame^] | 8 | basepython = python3 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 9 | usedevelop = True |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 10 | install_command = pip install {opts} {packages} |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 11 | setenv = |
| 12 | VIRTUAL_ENV={envdir} |
| 13 | PYTHONWARNINGS=default::DeprecationWarning |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 14 | deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
| 15 | -r{toxinidir}/test-requirements.txt |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 16 | commands = |
| 17 | stestr run {posargs} |
| 18 | stestr slowest |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 19 | |
| 20 | [testenv:pep8] |
Brian Haley | 0ae7f10 | 2020-03-20 11:14:44 -0400 | [diff] [blame] | 21 | commands = flake8 |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 22 | |
| 23 | [testenv:venv] |
| 24 | commands = {posargs} |
| 25 | |
| 26 | [testenv:cover] |
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] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 41 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 42 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 43 | -r{toxinidir}/requirements.txt |
| 44 | -r{toxinidir}/doc/requirements.txt |
| 45 | whitelist_externals = rm |
| 46 | commands = |
| 47 | rm -rf doc/build |
| 48 | sphinx-build -W -b html doc/source doc/build/html |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 49 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 50 | [testenv:pdf-docs] |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 51 | deps = {[testenv:docs]deps} |
| 52 | whitelist_externals = |
| 53 | make |
| 54 | rm |
| 55 | commands = |
| 56 | rm -rf doc/build/pdf |
| 57 | sphinx-build -W -b latex doc/source doc/build/pdf |
| 58 | make -C doc/build/pdf |
| 59 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 60 | [testenv:releasenotes] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 61 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 62 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 63 | -r{toxinidir}/requirements.txt |
| 64 | -r{toxinidir}/doc/requirements.txt |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 65 | commands = |
| 66 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 67 | |
| 68 | [testenv:debug] |
| 69 | commands = oslo_debug_helper {posargs} |
| 70 | |
| 71 | [flake8] |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 72 | show-source = True |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 73 | builtins = _ |
| 74 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Brian Haley | 0ae7f10 | 2020-03-20 11:14:44 -0400 | [diff] [blame] | 75 | import-order-style = pep8 |
| 76 | # [H106]: Don't put vim configuration in source files |
| 77 | # [H203]: Use assertIs(Not)None to check for None |
| 78 | # [H204]: Use assert(Not)Equal to check for equality |
| 79 | # [H205]: Use assert(Greater|Less)(Equal) for comparison |
| 80 | # [H904]: Delay string interpolations at logging calls |
| 81 | enable-extensions=H106,H203,H204,H205,H904 |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 82 | |
| 83 | [testenv:genconfig] |
| 84 | whitelist_externals = mkdir |
| 85 | commands = |
| 86 | mkdir -p etc |
| 87 | oslo-config-generator --output-file etc/octavia.tempest.conf.sample \ |
| 88 | --namespace tempest.config |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame^] | 89 | |
| 90 | [testenv:requirements] |
| 91 | deps = |
| 92 | -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements |
| 93 | whitelist_externals = sh |
| 94 | commands = |
| 95 | sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master' |