Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 1 | [tox] |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 2 | minversion = 3.18.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 |
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] |
Michael Johnson | 46658f2 | 2020-09-13 10:38:35 -0700 | [diff] [blame] | 21 | commands = |
| 22 | flake8 |
| 23 | check-uuid --package octavia_tempest_plugin |
| 24 | |
| 25 | [testenv:uuidgen] |
| 26 | commands = check-uuid --fix --package octavia_tempest_plugin |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 27 | |
| 28 | [testenv:venv] |
| 29 | commands = {posargs} |
| 30 | |
| 31 | [testenv:cover] |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 32 | setenv = |
| 33 | {[testenv]setenv} |
| 34 | PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 35 | allowlist_externals = |
Michael Johnson | 0f28a48 | 2018-05-23 16:22:45 -0700 | [diff] [blame] | 36 | find |
| 37 | commands = |
| 38 | find octavia_tempest_plugin -type f -name "*.pyc" -delete |
| 39 | coverage erase |
| 40 | stestr run {posargs} |
| 41 | coverage combine |
| 42 | coverage html -d cover |
| 43 | coverage xml -o cover/coverage.xml |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 44 | |
| 45 | [testenv:docs] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 46 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 47 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Michael Johnson | a507425 | 2020-06-30 10:28:09 -0700 | [diff] [blame] | 48 | -r{toxinidir}/test-requirements.txt |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 49 | -r{toxinidir}/doc/requirements.txt |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 50 | allowlist_externals = rm |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 51 | commands = |
| 52 | rm -rf doc/build |
| 53 | sphinx-build -W -b html doc/source doc/build/html |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 54 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 55 | [testenv:pdf-docs] |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 56 | deps = {[testenv:docs]deps} |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 57 | allowlist_externals = |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 58 | make |
| 59 | rm |
| 60 | commands = |
| 61 | rm -rf doc/build/pdf |
| 62 | sphinx-build -W -b latex doc/source doc/build/pdf |
| 63 | make -C doc/build/pdf |
| 64 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 65 | [testenv:releasenotes] |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 66 | deps = |
Michael Johnson | f298ed0 | 2019-06-28 16:00:38 -0700 | [diff] [blame] | 67 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 68 | -r{toxinidir}/requirements.txt |
| 69 | -r{toxinidir}/doc/requirements.txt |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 70 | commands = |
| 71 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 72 | |
| 73 | [testenv:debug] |
| 74 | commands = oslo_debug_helper {posargs} |
| 75 | |
| 76 | [flake8] |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 77 | show-source = True |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 78 | builtins = _ |
| 79 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Brian Haley | 0ae7f10 | 2020-03-20 11:14:44 -0400 | [diff] [blame] | 80 | import-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 |
| 86 | enable-extensions=H106,H203,H204,H205,H904 |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 87 | |
Michael Johnson | a507425 | 2020-06-30 10:28:09 -0700 | [diff] [blame] | 88 | [flake8:local-plugins] |
| 89 | extension = |
| 90 | O316 = checks:assert_true_instance |
| 91 | O318 = checks:assert_equal_or_not_none |
| 92 | O323 = checks:assert_equal_true_or_false |
| 93 | O324 = checks:no_mutable_default_args |
| 94 | O338 = checks:assert_equal_in |
| 95 | O339 = checks:no_log_warn |
| 96 | O341 = checks:no_translate_logs |
| 97 | O342 = checks:check_raised_localized_exceptions |
| 98 | O345 = checks:check_no_eventlet_imports |
| 99 | O346 = checks:check_line_continuation_no_backslash |
| 100 | O347 = checks:revert_must_have_kwargs |
| 101 | O348 = checks:check_no_logging_imports |
| 102 | O349 = checks:check_no_import_mock |
| 103 | paths = |
| 104 | ./octavia_tempest_plugin/hacking |
| 105 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 106 | [testenv:genconfig] |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 107 | allowlist_externals = mkdir |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 108 | commands = |
| 109 | mkdir -p etc |
| 110 | oslo-config-generator --output-file etc/octavia.tempest.conf.sample \ |
| 111 | --namespace tempest.config |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame] | 112 | |
| 113 | [testenv:requirements] |
| 114 | deps = |
| 115 | -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements |
Takashi Kajinami | a6ccdc9 | 2022-05-22 22:31:33 +0900 | [diff] [blame] | 116 | allowlist_externals = sh |
Brian Haley | 47e4589 | 2020-05-19 15:56:11 -0400 | [diff] [blame] | 117 | commands = |
| 118 | sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master' |