blob: 7c36faf6e4218b3ecd51513aac342b0ada240eae [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
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05004skipsdist = True
Riccardo Pittau7825e282019-12-23 11:20:52 +01005ignore_basepython_conflict=true
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05006
7[testenv]
Ghanshyame83d2202020-01-23 18:03:56 -06008basepython = python3
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -05009usedevelop = True
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050010setenv =
11 VIRTUAL_ENV={envdir}
12 PYTHONWARNINGS=default::DeprecationWarning
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020013deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
chenke2494c8a2019-06-17 21:49:34 +080014 -r{toxinidir}/test-requirements.txt
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010015commands = stestr run --slowest {posargs}
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050016
17[testenv:pep8]
Riccardo Pittau13de53a2021-01-23 18:46:46 +010018deps =
Jay Faulkner16709872023-04-21 12:39:21 -070019 hacking~=6.0.0 # Apache-2.0
Riccardo Pittau13de53a2021-01-23 18:46:46 +010020 flake8-import-order>=0.17.1 # LGPLv3
Riccardo Pittau87982752021-11-25 15:12:59 +010021 pycodestyle>=2.0.0,<3.0.0 # MIT
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050022commands = flake8 {posargs}
23
24[testenv:venv]
25commands = {posargs}
26
27[testenv:cover]
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010028setenv =
29 {[testenv]setenv}
30 PYTHON=coverage run --source ironic_tempest_plugin --parallel-mode
31commands =
32 stestr run {posargs}
33 coverage combine
Riccardo Pittau13de53a2021-01-23 18:46:46 +010034 coverage html -d cover
Iury Gregory Melo Ferreira41a016b2020-03-20 19:10:15 +010035 coverage xml -o cover/coverage.xml
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050036
37[testenv:docs]
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020038deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
39 -r{toxinidir}/doc/requirements.txt
40commands = sphinx-build -W -b html doc/source doc/build/html
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050041
Kaifeng Wang6f4e2a32019-06-14 17:43:14 +080042[testenv:pdf-docs]
Andreas Jaeger7e2d6f22020-05-03 11:18:36 +020043deps = {[testenv:docs]deps}
Riccardo Pittauc4ad6e22021-06-15 10:04:18 +020044allowlist_externals = make
Kaifeng Wang6f4e2a32019-06-14 17:43:14 +080045commands = sphinx-build -b latex doc/source doc/build/pdf
46 make -C doc/build/pdf
47
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050048[testenv:debug]
49commands = oslo_debug_helper {posargs}
50
51[flake8]
Riccardo Pittau441c5062020-03-30 15:06:28 +020052# [W503] Line break occurred before a binary operator. Conflicts with W504.
Riccardo Pittau7f71d492020-08-03 17:39:41 +020053ignore = W503
Jim Rollenhagen4f8f2292016-11-18 06:22:18 -050054show-source = True
55builtins = _
56exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Riccardo Pittau16098692020-04-21 17:06:10 +020057import-order-style = pep8
58application-import-names = ironic_tempest_plugin
59filename = *.py
60