Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 1 | [tox] |
Riccardo Pittau | 7825e28 | 2019-12-23 11:20:52 +0100 | [diff] [blame] | 2 | minversion = 3.1.0 |
Iury Gregory Melo Ferreira | 41a016b | 2020-03-20 19:10:15 +0100 | [diff] [blame] | 3 | envlist = pep8 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 4 | skipsdist = True |
Riccardo Pittau | 7825e28 | 2019-12-23 11:20:52 +0100 | [diff] [blame] | 5 | ignore_basepython_conflict=true |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 6 | |
| 7 | [testenv] |
Ghanshyam | e83d220 | 2020-01-23 18:03:56 -0600 | [diff] [blame] | 8 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 9 | usedevelop = True |
chenke | 2494c8a | 2019-06-17 21:49:34 +0800 | [diff] [blame] | 10 | install_command = pip install {opts} {packages} |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 11 | setenv = |
| 12 | VIRTUAL_ENV={envdir} |
| 13 | PYTHONWARNINGS=default::DeprecationWarning |
chenke | 2494c8a | 2019-06-17 21:49:34 +0800 | [diff] [blame] | 14 | deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
| 15 | -r{toxinidir}/test-requirements.txt |
Iury Gregory Melo Ferreira | 41a016b | 2020-03-20 19:10:15 +0100 | [diff] [blame] | 16 | commands = stestr run --slowest {posargs} |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 17 | |
| 18 | [testenv:pep8] |
| 19 | commands = flake8 {posargs} |
| 20 | |
| 21 | [testenv:venv] |
| 22 | commands = {posargs} |
| 23 | |
| 24 | [testenv:cover] |
Iury Gregory Melo Ferreira | 41a016b | 2020-03-20 19:10:15 +0100 | [diff] [blame] | 25 | setenv = |
| 26 | {[testenv]setenv} |
| 27 | PYTHON=coverage run --source ironic_tempest_plugin --parallel-mode |
| 28 | commands = |
| 29 | stestr run {posargs} |
| 30 | coverage combine |
| 31 | coverage htlm -d cover |
| 32 | coverage xml -o cover/coverage.xml |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 33 | |
| 34 | [testenv:docs] |
| 35 | commands = python setup.py build_sphinx |
| 36 | |
Kaifeng Wang | 6f4e2a3 | 2019-06-14 17:43:14 +0800 | [diff] [blame] | 37 | [testenv:pdf-docs] |
Kaifeng Wang | 6f4e2a3 | 2019-06-14 17:43:14 +0800 | [diff] [blame] | 38 | whitelist_externals = make |
| 39 | commands = sphinx-build -b latex doc/source doc/build/pdf |
| 40 | make -C doc/build/pdf |
| 41 | |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 42 | [testenv:debug] |
| 43 | commands = oslo_debug_helper {posargs} |
| 44 | |
| 45 | [flake8] |
Riccardo Pittau | 441c506 | 2020-03-30 15:06:28 +0200 | [diff] [blame] | 46 | # [E129] Visually indented line with same indent as next logical line. |
| 47 | # [W503] Line break occurred before a binary operator. Conflicts with W504. |
| 48 | ignore = E129,W503 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 49 | show-source = True |
| 50 | builtins = _ |
| 51 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Riccardo Pittau | 1609869 | 2020-04-21 17:06:10 +0200 | [diff] [blame^] | 52 | import-order-style = pep8 |
| 53 | application-import-names = ironic_tempest_plugin |
| 54 | filename = *.py |
| 55 | |