fe00700f58
Tests still have python2.7 configs remaining and some tests are named -debian, implying the old ones are for centos and can be removed. This commit removes the python2.7 and centos configs from tox and zuul. Test Plan: 1. PASS - Ran all tests in tox and verified if every test finished with the desired output. 2. PASS - Ran tests in zuul environment and checked if it was successfull. Story: 2010531 Task: 48385 Change-Id: I2de9ef82a86e2ce35a3f2a5824f5dac634d2bd1e Signed-off-by: Gustavo Pereira <gustavo.lyrapereira@windriver.com>
112 lines
2.9 KiB
INI
112 lines
2.9 KiB
INI
[tox]
|
|
minversion = 2.3
|
|
envlist = py39,pep8,pylint
|
|
skipsdist = True
|
|
|
|
toxworkdir = /tmp/{env:USER}_dc_client_tox
|
|
|
|
[dcclient]
|
|
client_base_dir = .
|
|
|
|
[testenv]
|
|
basepython = python3.9
|
|
install_command = pip install \
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
|
{opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
|
|
deps = -r{toxinidir}/test-requirements-debian.txt
|
|
-r{toxinidir}/requirements.txt
|
|
allowlist_externals =
|
|
rm
|
|
find
|
|
reno
|
|
|
|
[testenv:py39]
|
|
skipdist = False
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
|
|
|
|
[testenv:pep8]
|
|
deps = -r{toxinidir}/test-requirements-debian.txt
|
|
commands = flake8
|
|
|
|
[testenv:pylint]
|
|
deps = -r{toxinidir}/test-requirements-debian.txt
|
|
commands =
|
|
pylint {posargs} dcmanagerclient --rcfile=./pylint.rc
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
PYTHON=coverage run --parallel-mode
|
|
PYTHONDONTWRITEBYTECODE=True
|
|
deps = -r{toxinidir}/test-requirements-debian.txt
|
|
coverage
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
coverage erase
|
|
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# W504 line break after binary operator
|
|
# W605 invalid escape sequence
|
|
show-source = True
|
|
ignore = E123,E125,W504,W605,H102
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
# bashate ignore:
|
|
# E006 - accept long lines
|
|
# E040 - false positive on |& syntax (new in bash 4)
|
|
allowlist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint"
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
|
allowlist_externals = rm
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
allowlist_externals =
|
|
rm
|
|
reno
|
|
|
|
[testenv:newnote]
|
|
basepython = python3
|
|
# Re-use the releasenotes venv
|
|
envdir = {toxworkdir}/releasenotes
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = reno new {posargs}
|