Enable unit testing coverage reporting. Change-Id: I4d0cf0ae1716d880bfc2c73735ac2e1b6ec1c0d7
65 lines
1.2 KiB
INI
65 lines
1.2 KiB
INI
[tox]
|
|
envlist = pep8,py3
|
|
skipsdist = True
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONHASHSEED=0
|
|
install_command =
|
|
pip install {opts} {packages}
|
|
commands = stestr run {posargs}
|
|
|
|
[testenv:py3]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:py39]
|
|
basepython = python3.9
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:py311]
|
|
basepython = python3.11
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:py312]
|
|
basepython = python3.12
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs} charms_openstack unit_tests
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[coverage:run]
|
|
branch = True
|
|
concurrency = multiprocessing
|
|
parallel = True
|
|
source =
|
|
.
|
|
omit =
|
|
.tox/*
|
|
unit_tests/*
|
|
*/templates/*
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
ignore = E402,E226,W504
|