Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.13 testing #685

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading