Skip to content

Commit

Permalink
Add Python 3.13 testing (#685)
Browse files Browse the repository at this point in the history
* Add Python 3.13 testing
  • Loading branch information
Shrews authored Jul 23, 2024
1 parent e1bc628 commit 469f92c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
- name: '3.12'
tox_env: integration-py312

- name: '3.13'
tox_env: integration-py313

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -70,6 +73,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version.name }}
allow-prereleases: true

- name: Install tox
run: |
Expand Down Expand Up @@ -104,6 +108,9 @@ jobs:
- name: '3.12'
tox_env: unit-py312

- name: '3.13'
tox_env: unit-py313

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -112,6 +119,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version.name }}
allow-prereleases: true

- name: Install tox
run: |
Expand Down
13 changes: 9 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ 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

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
Expand All @@ -22,19 +27,19 @@ 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
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 =
Expand Down

0 comments on commit 469f92c

Please sign in to comment.