
This is a re-submission of [1], which was reverted due to issues with centos builds. This change can merge now that centos is no longer supported. Fixed versioning and adjusted some build files to bring them as close to a standard as possible. - Remove centos files - Fix mismatch in plugin name, set to python3-k8sapp-APP - Standardize plugin debian files (rules, *.install) - plugin wheels saved to /plugin instead of /plugin/<app> Note: - Version tracking changes made in [1] were not added here as they are addressed in a different commit [1] https://review.opendev.org/c/starlingx/oidc-auth-armada-app/+/868293 Test Plan: PASS build-pkgs PASS wheel version updated PASS app tarball contains wheel file Story: 2010542 Task: 47516 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Change-Id: I18b99c9e68270b5dd5607ddaffb229904ac61c65
127 lines
3.3 KiB
INI
127 lines
3.3 KiB
INI
[tox]
|
|
envlist = flake8,py36,py39,pylint,bandit
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
# tox does not work if the path to the workdir is too long, so move it to /tmp
|
|
toxworkdir = /tmp/{env:USER}_k8soidctox
|
|
stxdir = {toxinidir}/../../..
|
|
distshare={toxworkdir}/.tox/distshare
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
# usedevelop = True
|
|
# enabling usedevelop results in py27 develop-inst:
|
|
# Exception: Versioning for this project requires either an sdist tarball,
|
|
# or access to an upstream git repository.
|
|
sitepackages = False
|
|
|
|
# tox is silly... these need to be separated by a newline....
|
|
allowlist_externals = bash
|
|
find
|
|
|
|
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}
|
|
|
|
# Note the hash seed is set to 0 until can be tested with a
|
|
# random hash seed successfully.
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONHASHSEED=0
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
OS_TEST_PATH=./k8sapp_oidc/tests
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
EVENTS_YAML=./k8sapp_oidc/tests/events_for_testing.yaml
|
|
SYSINV_TEST_ENV=True
|
|
TOX_WORK_DIR={toxworkdir}
|
|
PYLINTHOME={toxworkdir}
|
|
|
|
# The path for cgcs-patch should be updated to sw-patch
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-e{[tox]stxdir}/config/tsconfig/tsconfig
|
|
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
|
|
-e{[tox]stxdir}/fault/fm-api/source
|
|
-e{[tox]stxdir}/fault/python-fmclient/fmclient
|
|
-e{[tox]stxdir}/utilities/ceph/python-cephclient/python-cephclient
|
|
-e{[tox]stxdir}/update/cgcs-patch/cgcs-patch
|
|
|
|
|
|
passenv =
|
|
XDG_CACHE_HOME
|
|
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
[flake8]
|
|
exclude = build,dist,tools,.eggs
|
|
max-line-length=120
|
|
|
|
[testenv:flake8]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
flake8 {posargs} .
|
|
|
|
[testenv:py36]
|
|
basepython = python3.6
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py39]
|
|
basepython = python3.9
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
|
|
[testenv:pep8]
|
|
# testenv:flake8 clone
|
|
basepython = {[testenv:flake8]basepython}
|
|
deps = {[testenv:flake8]deps}
|
|
commands = {[testenv:flake8]commands}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[bandit]
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit --ini tox.ini -n 5 -r k8sapp_oidc
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
commands =
|
|
pylint {posargs} k8sapp_oidc --rcfile=./pylint.rc
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
setenv = {[testenv]setenv}
|
|
PYTHON=coverage run --parallel-mode
|
|
|
|
commands =
|
|
{[testenv]commands}
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:pip-missing-reqs]
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = pip_missing_reqs
|
|
-rrequirements.txt
|
|
commands=pip-missing-reqs -d --ignore-file=/k8sapp_oidc/tests k8sapp_oidc
|