Skip to content

Commit

Permalink
Add Python 3.13 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrews committed Jul 1, 2024
1 parent b1273ed commit c6aa7f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 6 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.0-alpha - 3.13.0'
tox_env: integration-py313

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -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
Expand Down
15 changes: 11 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,19 +29,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 c6aa7f5

Please sign in to comment.