From 1d71eb349e272e4af1546599851c753fed2d950b Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 30 May 2024 08:54:30 -0700 Subject: [PATCH] Add nox and tox py312 jobs Python 3.12 is a thing now and is present in a stable Linux distro release (Ubuntu Noble). It seems reasonable for people to want to run nox and tox against py312 targets. Let's make it easy for them and add jobs to do that for them. Change-Id: I9d644cfbe65b92207a5fe2ad6dd950093bda87dd --- doc/source/python-jobs.rst | 2 ++ zuul-tests.d/project.yaml | 4 ++++ zuul.d/python-jobs.yaml | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/doc/source/python-jobs.rst b/doc/source/python-jobs.rst index 71b552619..02081d067 100644 --- a/doc/source/python-jobs.rst +++ b/doc/source/python-jobs.rst @@ -10,6 +10,7 @@ Python Jobs .. zuul:autojob:: tox-py39 .. zuul:autojob:: tox-py310 .. zuul:autojob:: tox-py311 +.. zuul:autojob:: tox-py312 .. zuul:autojob:: tox-docs .. zuul:autojob:: tox-linters .. zuul:autojob:: tox-molecule @@ -24,6 +25,7 @@ Python Jobs .. zuul:autojob:: nox-py39 .. zuul:autojob:: nox-py310 .. zuul:autojob:: nox-py311 +.. zuul:autojob:: nox-py312 .. zuul:autojob:: nox-docs .. zuul:autojob:: nox-linters .. zuul:autojob:: nox-cover diff --git a/zuul-tests.d/project.yaml b/zuul-tests.d/project.yaml index dfeb89f39..4eef7c5f0 100644 --- a/zuul-tests.d/project.yaml +++ b/zuul-tests.d/project.yaml @@ -12,6 +12,8 @@ nodeset: ubuntu-jammy - tox-py311: nodeset: ubuntu-jammy + - tox-py312: + nodeset: ubuntu-noble gate: jobs: - zuul-tox-docs @@ -21,6 +23,8 @@ nodeset: ubuntu-jammy - tox-py311: nodeset: ubuntu-jammy + - tox-py312: + nodeset: ubuntu-noble promote: jobs: - zuul-promote-docs diff --git a/zuul.d/python-jobs.yaml b/zuul.d/python-jobs.yaml index 041fa8a1f..fdd21e739 100644 --- a/zuul.d/python-jobs.yaml +++ b/zuul.d/python-jobs.yaml @@ -203,6 +203,17 @@ tox_envlist: py311 python_version: "3.11" +- job: + name: tox-py312 + parent: tox + description: | + Run unit tests for a Python project under cPython version 3.12. + + Uses tox with the ``py312`` environment. + vars: + tox_envlist: py312 + python_version: "3.12" + - job: name: tox-docs # This is not parented to tox since we do not need @@ -468,6 +479,18 @@ nox_force_python: "3.11" python_version: "3.11" +- job: + name: nox-py312 + parent: nox + description: | + Run unit tests for a Python project under cPython version 3.12. + + Uses nox with the ``test`` keyword forcing python 3.12. + vars: + nox_keyword: tests + nox_force_python: "3.12" + python_version: "3.12" + - job: name: nox-cover parent: nox