blob: 3a67abc42e6655a4102c154eb8e0ff907982ebe9 [file] [log] [blame]
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05001[tox]
Riccardo Pittauc4ad6e22021-06-15 10:04:18 +02002minversion = 3.18.0
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +01003envlist = pep8
Riccardo Pittau7825e282019-12-23 11:20:52 +01004ignore_basepython_conflict=true
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05005
6[testenv]
Ghanshyame83d2202020-01-23 18:03:56 -06007basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05008usedevelop = True
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05009setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020012deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
chenke2494c8a2019-06-17 21:49:34 +080013 -r{toxinidir}/test-requirements.txt
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010014commands = stestr run --slowest {posargs}
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050015
16[testenv:pep8]
Riccardo Pittau13de53a2021-01-23 18:46:46 +010017deps =
Jay Faulkner16709872023-04-21 12:39:21 -070018 hacking~=6.0.0 # Apache-2.0
Riccardo Pittau13de53a2021-01-23 18:46:46 +010019 flake8-import-order>=0.17.1 # LGPLv3
Riccardo Pittau87982752021-11-25 15:12:59 +010020 pycodestyle>=2.0.0,<3.0.0 # MIT
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050021commands = flake8 {posargs}
22
23[testenv:venv]
24commands = {posargs}
25
26[testenv:cover]
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010027setenv =
28 {[testenv]setenv}
29 PYTHON=coverage run --source ironic_tempest_plugin --parallel-mode
30commands =
31 stestr run {posargs}
32 coverage combine
Riccardo Pittau13de53a2021-01-23 18:46:46 +010033 coverage html -d cover
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010034 coverage xml -o cover/coverage.xml
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050035
36[testenv:docs]
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020037deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
38 -r{toxinidir}/doc/requirements.txt
39commands = sphinx-build -W -b html doc/source doc/build/html
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050040
Kaifeng Wang6f4e2a32019-06-14 17:43:14 +080041[testenv:pdf-docs]
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020042deps = {[testenv:docs]deps}
Riccardo Pittauc4ad6e22021-06-15 10:04:18 +020043allowlist_externals = make
Kaifeng Wang6f4e2a32019-06-14 17:43:14 +080044commands = sphinx-build -b latex doc/source doc/build/pdf
45 make -C doc/build/pdf
46
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050047[testenv:debug]
48commands = oslo_debug_helper {posargs}
49
50[flake8]
Riccardo Pittau441c5062020-03-30 15:06:28 +020051# [W503] Line break occurred before a binary operator. Conflicts with W504.
Riccardo Pittau7f71d492020-08-03 17:39:41 +020052ignore = W503
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050053show-source = True
54builtins = _
55exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Riccardo Pittau16098692020-04-21 17:06:10 +020056import-order-style = pep8
57application-import-names = ironic_tempest_plugin
58filename = *.py
59