Leonardo Fagundes Luz Serrano aa03f479f2 Cleanup tox and zuul
tox changes:
 - remove python2.7 and python3.6 unit test targets
   from tox.ini since only python 3.9 is supported
 - tox jobs are now setup for python 3.9
 - Added additional suppressions for new pylint codes.

Zuul changes:
 - remove py27 job from zuul
 - set the parent zuul jobs to be the jobs defined under
   openstack-zuul-jobs rather than just zuul-jobs
 - Specify debian-bullseye (python3.9) as the nodeset.
   ubuntu-jammy is python3.10, ubuntu-focal is python3.8
 - override tox constraints file to use the STX constraints
   This means starlingx/root needs to be a required project

Notes:
- these changes do not affect runtime.

Test Plan:
pass tox
pass build-pkgs

Story: 2010531
Task: 47511

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: I4649c60e669b546ff8b31df832e6e16b348f2fee
2023-02-28 12:33:53 -03:00

48 lines
1.3 KiB
INI

[tox]
envlist = linters
minversion = 2.9
skipsdist = True
sitepackages=False
[testenv]
basepython = python3
install_command = pip install -U \
{opts} {packages} \
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
setenv =
VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_DEBUG=1
OS_LOG_CAPTURE=1
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals =
bash
[testenv:bashate]
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
commands =
bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-name \*.sh \
-print0 | xargs -r -n 1 -0 bashate -v \
-e 'E*'"
[testenv:linters]
commands =
{[testenv:bashate]commands}
[testenv:flake8]
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pylint]
description = Dummy environment to allow pylint to be run in subdir tox
[testenv:bandit]
description = Dummy environment to allow bandit to be run in subdir tox