From 1b47ceb2b6ff894fc943906975e894181ce496a2 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 1 Sep 2021 15:07:59 -0400 Subject: [PATCH] Add python3.9 gate Added python3.9 gate, tested by running tox locally and running the zuul gate. Story: 2009101 Task: 43162 Signed-off-by: Charles Short Change-Id: I4946d9b7b1657fc2e5b3657763ac0501d361892d --- .zuul.yaml | 20 +++++++++++++++++++ bindep.txt | 10 ++++++++++ .../k8sapp_nginx_ingress_controller/tox.ini | 16 +++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 bindep.txt diff --git a/.zuul.yaml b/.zuul.yaml index 11dfbdb..8aab373 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,6 +5,7 @@ - openstack-tox-linters - k8sapp-nginx-ingress-controller-tox-py27 - k8sapp-nginx-ingress-controller-tox-py36 + - k8sapp-nginx-ingress-controller-tox-py39 - k8sapp-nginx-ingress-controller-tox-flake8 - k8sapp-nginx-ingress-controller-tox-pylint - k8sapp-nginx-ingress-controller-tox-bandit @@ -13,6 +14,7 @@ - openstack-tox-linters - k8sapp-nginx-ingress-controller-tox-py27 - k8sapp-nginx-ingress-controller-tox-py36 + - k8sapp-nginx-ingress-controller-tox-py39 - k8sapp-nginx-ingress-controller-tox-flake8 - k8sapp-nginx-ingress-controller-tox-pylint - k8sapp-nginx-ingress-controller-tox-bandit @@ -54,6 +56,24 @@ tox_envlist: py36 tox_extra_args: -c python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini +- job: + name: k8sapp-nginx-ingress-controller-tox-py39 + parent: tox-py39 + description: | + Run py39 test for k8sapp-nginx-ingress-controller + nodeset: debian-bullseye + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + files: + - python-k8sapp-nginx-ingress-controller/* + vars: + tox_envlist: py39 + python_version: 3.9 + tox_extra_args: -c python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini + - job: name: k8sapp-nginx-ingress-controller-tox-flake8 parent: tox diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..3ffe69f --- /dev/null +++ b/bindep.txt @@ -0,0 +1,10 @@ +# 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] +libldap2-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] +libsasl2-dev [platform:dpkg] +libffi-devel [platform:rpm] +python3-all-dev [platform:dpkg] diff --git a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini index f758bc2..f008ff3 100644 --- a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini +++ b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = flake8,py27,py36,pylint,bandit +envlist = flake8,py27,py36,py39,pylint,bandit minversion = 1.6 # disable source dist generation because Zuul fails on setting up # pbr randomly in the sdist step. @@ -16,7 +16,7 @@ distshare={toxworkdir}/.tox/distshare # Exception: Versioning for this project requires either an sdist tarball, # or access to an upstream git repository. # Note. site-packages is true and rpm-python must be yum installed on your dev machine. -sitepackages = True +sitepackages = False # tox is silly... these need to be separated by a newline.... whitelist_externals = bash @@ -79,6 +79,18 @@ commands = stestr run {posargs} stestr slowest +[testenv:py39] +basepython = python3.9 +install_command = pip install \ + -v -v -v \ + -c{toxinidir}/upper-constraints.txt \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ + {opts} {packages} +commands = + {[testenv]commands} + stestr run {posargs} + stestr slowest + [testenv:pep8] # testenv:flake8 clone basepython = {[testenv:flake8]basepython}