diskimage-builder/tox.ini
Ian Wienand 2a25db9ee6
Start running dib-lint again
A recent change that didn't fail with hard-tabs made me realise we're
not running tox -e pep8 ... which means we're not running dib-lint
which should find this (and other things).

I couldn't pinpoint when this happened; maybe job config was never in
this repo.

Anyway, move the pylint and dib-lint/flake8 testing to the now
standard "linters" and update the linting job to
openstack-tox-linters.

It looks like pylint is very lightly used (came in with
I7e24d8348db3aef79e1395d12692199a1f80161a and we've never expanded any
testing).  Leave this alone for now, but probably it is not important
any more.

This revealed some issues; updated flake8
(Iaa19c36f8cab8482a01f764c588375db8e7d8be3) found some spacing issues
with keywords and an update to elrepo to match our standard bash
flags.

Change-Id: I45bf108c467f7c8190ca252e6c48450c2622aaf8
2022-09-21 07:56:05 +10:00

73 lines
1.7 KiB
INI

[tox]
envlist = pep8,linters,py3
minversion = 3.18.0
skipsdist = True
ignore_basepython_conflict = True
[testenv]
usedevelop = True
basepython = python3
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands= stestr run --slowest {posargs}
passenv=
DUMP_CONFIG_GRAPH
[testenv:bindep]
deps = bindep
commands = bindep test
[testenv:linters]
commands =
pylint --rcfile pylint.cfg diskimage_builder
flake8 {posargs}
dib-lint
[testenv:venv]
commands = {posargs}
[testenv:func]
envdir = {toxworkdir}/venv
commands = {toxinidir}/tests/run_functests.sh {posargs}
[testenv:cover]
basepython = python3
allowlist_externals = find
setenv =
PYTHON=coverage run --source diskimage_builder --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
deps=
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
basepython = python3
allowlist_externals =
rm
commands =
rm -rf doc/build
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html {posargs}
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
ignore = E125,E126,E127,H202,H803,W503,W504
exclude = .venv,.git,.tox,dist,doc/build,doc/source,*lib/python*,*egg,build,conf.py
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt