From 6b13af928600bf541d87bf1db3833e1c40ca334d Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Mon, 18 Mar 2024 13:50:53 -0400 Subject: [PATCH] Add Python 3.12 testing --- .github/workflows/ci.yml | 6 ++++++ setup.cfg | 2 ++ test/requirements.txt | 2 +- tox.ini | 8 ++++---- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce4e4939..aaa29522 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,9 @@ jobs: - name: '3.11' tox_env: integration-py311 + - name: '3.12' + tox_env: integration-py312 + steps: - name: Checkout uses: actions/checkout@v3 @@ -173,6 +176,9 @@ jobs: - name: '3.11' tox_env: unit-py311 + - name: '3.12' + tox_env: unit-py312 + steps: - name: Checkout uses: actions/checkout@v3 diff --git a/setup.cfg b/setup.cfg index 5da28166..e513eeb7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: 3 :: Only Topic :: Software Development :: Build Tools Topic :: System :: Systems Administration @@ -38,6 +39,7 @@ install_requires = requirements_parser bindep jsonschema + setuptools; python_version >= "3.12" python_requires = >=3.9 diff --git a/test/requirements.txt b/test/requirements.txt index baa83037..51685388 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,7 +1,7 @@ coverage flake8==6.1.0 mypy==1.6.0 -pytest +pytest==8.1.1 pytest-cov pytest-mock pytest-xdist diff --git a/tox.ini b/tox.ini index e8c281ef..cea99565 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = -r {toxinidir}/test/requirements.txt commands = pytest -n auto {posargs} -[testenv:linters{,-py39,-py310,-py311}] +[testenv:linters{,-py39,-py310,-py311,-py312}] description = Run code linters commands = flake8 --version @@ -22,11 +22,11 @@ commands = mypy src/ansible_builder pylint src/ansible_builder test -[testenv:unit{,-py39,-py310,-py311}] +[testenv:unit{,-py39,-py310,-py311,-py312}] description = Run unit tests commands = pytest -n auto test/unit {posargs} {[shared]pytest_cov_args} -[testenv:pulp-integration{-py39,-py310,-py311}] +[testenv:pulp-integration{-py39,-py310,-py311,-py312}] # Some of these tests must run serially because of a shared resource # (the system policy.json file). description = Run pulp integration tests @@ -34,7 +34,7 @@ commands = pytest -n auto -m "not serial" test/pulp_integration {posargs} {[shared]pytest_cov_args} pytest -n 0 -m "serial" test/pulp_integration {posargs} {[shared]pytest_cov_args} -[testenv:integration{,-py39,-py310,-py311}] +[testenv:integration{,-py39,-py310,-py311,-py312}] description = Run integration tests # rootless podman reads $HOME passenv =