28f3d1ce17
Following changes are done as part of this patch: * Sync global tox, requirements.txt, test-requirements from release-tools project * Resolve flake errors * Restructure unit tests directory
98 lines
1.8 KiB
INI
98 lines
1.8 KiB
INI
# Source charm: ./tox.ini
|
|
# This file is managed centrally by release-tools and should not be modified
|
|
# within individual charm repos. See the 'global' dir contents for available
|
|
# choices of tox.ini for OpenStack Charms:
|
|
# https://github.com/openstack-charmers/release-tools
|
|
|
|
[tox]
|
|
skipsdist = True
|
|
envlist = pep8,py3
|
|
sitepackages = False
|
|
skip_missing_interpreters = False
|
|
minversion = 3.18.0
|
|
|
|
[vars]
|
|
src_path = {toxinidir}/src/
|
|
tst_path = {toxinidir}/tests/
|
|
lib_path = {toxinidir}/lib/
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv =
|
|
PYTHONPATH = {toxinidir}:{[vars]lib_path}:{[vars]src_path}
|
|
passenv =
|
|
PYTHONPATH
|
|
install_command =
|
|
pip install {opts} {packages}
|
|
commands = stestr run --slowest {posargs}
|
|
allowlist_externals =
|
|
git
|
|
charmcraft
|
|
fetch-libs.sh
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:build]
|
|
basepython = python3
|
|
deps =
|
|
commands =
|
|
charmcraft clean
|
|
charmcraft -v pack
|
|
|
|
[testenv:fetch]
|
|
basepython = python3
|
|
deps =
|
|
commands =
|
|
{toxinidir}/fetch-libs.sh
|
|
|
|
[testenv:py3]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
[testenv:py3.8]
|
|
basepython = python3.8
|
|
deps = {[testenv:py3]deps}
|
|
|
|
[testenv:py3.9]
|
|
basepython = python3.9
|
|
deps = {[testenv:py3]deps}
|
|
|
|
[testenv:py3.10]
|
|
basepython = python3.10
|
|
deps = {[testenv:py3]deps}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
commands = flake8 {posargs} {[vars]src_path} {[vars]tst_path}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
deps = {[testenv:py3]deps}
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run
|
|
commands =
|
|
coverage erase
|
|
stestr run --slowest {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/*
|
|
tests/*
|
|
src/templates/*
|
|
|
|
[flake8]
|
|
ignore=E226,W504
|