From c6aa7f592c0ab7bead04243d8b06cecba2e1f835 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Thu, 20 Jun 2024 15:34:42 -0400 Subject: [PATCH 1/2] Add Python 3.13 testing --- .github/workflows/ci.yml | 6 ++++++ tox.ini | 15 +++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9b82f1a..44f3466a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,9 @@ jobs: - name: '3.12' tox_env: integration-py312 + - name: '3.13.0-alpha - 3.13.0' + tox_env: integration-py313 + steps: - name: Checkout uses: actions/checkout@v4 @@ -104,6 +107,9 @@ jobs: - name: '3.12' tox_env: unit-py312 + - name: '3.13.0-alpha - 3.13.0' + tox_env: unit-py313 + steps: - name: Checkout uses: actions/checkout@v4 diff --git a/tox.ini b/tox.ini index b5b37a8c..7115bae4 100644 --- a/tox.ini +++ b/tox.ini @@ -8,11 +8,18 @@ pytest_cov_args = --cov --cov-report html --cov-report term --cov-report xml [testenv] description = Run all tests with {basepython} usedevelop = True + +# Set env var to get a working Python 3.13 environment (see https://github.com/PyO3/pyo3/pull/3821) +setenv = + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 +passenv = + UNSAFE_PYO3_SKIP_VERSION_CHECK + deps = -r {toxinidir}/test/requirements.txt commands = pytest -n auto {posargs} -[testenv:linters{,-py39,-py310,-py311,-py312}] +[testenv:linters{,-py39,-py310,-py311,-py312,-py313}] description = Run code linters commands = flake8 --version @@ -22,11 +29,11 @@ commands = mypy src/ansible_builder pylint src/ansible_builder test -[testenv:unit{,-py39,-py310,-py311,-py312}] +[testenv:unit{,-py39,-py310,-py311,-py312,-py313}] description = Run unit tests commands = pytest -n auto test/unit {posargs} {[shared]pytest_cov_args} -[testenv:pulp-integration{-py39,-py310,-py311,-py312}] +[testenv:pulp-integration{-py39,-py310,-py311,-py312,-py313}] # Some of these tests must run serially because of a shared resource # (the system policy.json file). description = Run pulp integration tests @@ -34,7 +41,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,-py312}] +[testenv:integration{,-py39,-py310,-py311,-py312,-py313}] description = Run integration tests # rootless podman reads $HOME passenv = From 58599c44c0d1148b5dfae58bb2546b277ec2f477 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Tue, 23 Jul 2024 14:51:54 -0400 Subject: [PATCH 2/2] use allow-prereleases in GHA --- .github/workflows/ci.yml | 6 ++++-- tox.ini | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44f3466a..28c1bfd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: - name: '3.12' tox_env: integration-py312 - - name: '3.13.0-alpha - 3.13.0' + - name: '3.13' tox_env: integration-py313 steps: @@ -73,6 +73,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.py_version.name }} + allow-prereleases: true - name: Install tox run: | @@ -107,7 +108,7 @@ jobs: - name: '3.12' tox_env: unit-py312 - - name: '3.13.0-alpha - 3.13.0' + - name: '3.13' tox_env: unit-py313 steps: @@ -118,6 +119,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.py_version.name }} + allow-prereleases: true - name: Install tox run: | diff --git a/tox.ini b/tox.ini index 7115bae4..db301601 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,6 @@ usedevelop = True # Set env var to get a working Python 3.13 environment (see https://github.com/PyO3/pyo3/pull/3821) setenv = UNSAFE_PYO3_SKIP_VERSION_CHECK=1 -passenv = - UNSAFE_PYO3_SKIP_VERSION_CHECK deps = -r {toxinidir}/test/requirements.txt