diff --git a/.zuul.yaml b/.zuul.yaml index 2aa3481ed6..d729cc0a4d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -22,6 +22,7 @@ - tsconfig-tox-flake8 - cgtsclient-tox-py27 - cgtsclient-tox-py36 + - cgtsclient-tox-py39 - cgtsclient-tox-pep8 - cgtsclient-tox-pylint gate: @@ -42,6 +43,7 @@ - config-tox-flake8 - cgtsclient-tox-py27 - cgtsclient-tox-py36 + - cgtsclient-tox-py39 - cgtsclient-tox-pep8 - cgtsclient-tox-pylint post: @@ -263,6 +265,19 @@ tox_envlist: py36 tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini +- job: + name: cgtsclient-tox-py39 + parent: tox-py39 + description: | + Run py39 test for cgts-client + nodeset: ubuntu-focal + files: + - sysinv/cgts-client/* + vars: + bindep_profile: test py39 + python_version: 3.9 + tox_envlist: py39 + tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini - job: name: cgtsclient-tox-pep8 diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000000..06000dbbff --- /dev/null +++ b/bindep.txt @@ -0,0 +1,5 @@ +# This is a cross-platform list tracking distribution packages needed for install and tests; +# see https://docs.openstack.org/infra/bindep/ for additional information. + +libffi-dev [platform:dpkg] +libffi-devel [platform:rpm] diff --git a/sysinv/cgts-client/cgts-client/tox.ini b/sysinv/cgts-client/cgts-client/tox.ini index a3c44394d3..aeaeba47ef 100644 --- a/sysinv/cgts-client/cgts-client/tox.ini +++ b/sysinv/cgts-client/cgts-client/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py36,pep8,pylint +envlist = py27,py36,py39,pep8,pylint minversion = 1.6 #skipsdist = True @@ -46,6 +46,20 @@ commands = stestr run {posargs} stestr slowest +[testenv:py39] +basepython = python3.9 +install_command = pip install \ + -U \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/victoria/upper-constraints.txt} \ + {opts} {packages} +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -e{[tox]stxdir}/config/tsconfig/tsconfig +commands = + {[testenv]commands} + stestr run {posargs} + stestr slowest + [testenv:pep8] basepython = python3 deps = -r{toxinidir}/test-requirements.txt @@ -111,3 +125,12 @@ deps = {[testenv]deps} pylint commands = pylint {posargs} cgtsclient --rcfile=./pylint.rc --extension-pkg-whitelist=lxml.etree,greenlet + +[testenv:bindep] +# Do not install any requirements. We want this to be fast and work even if +# system dependencies are missing, since it's used to tell you what system +# dependencies are missing! This also means that bindep must be installed +# separately, outside of the requirements files. +skip_install = True +deps = bindep +commands = bindep test