Skip to content

Commit

Permalink
Add Python 3.12 testing (ansible#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrews committed Mar 19, 2024
1 parent 633a85b commit 312a812
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,6 +39,7 @@ install_requires =
requirements_parser
bindep
jsonschema
setuptools; python_version >= "3.12"
python_requires = >=3.9


Expand Down
1 change: 1 addition & 0 deletions test/integration/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def test_has_pytz(cli, runtime, data_dir, ee_tag, tmp_path):
assert 'World timezone definitions, modern and historical' in result.stdout


@pytest.mark.xfail(reason='Test is unstable with docker when run in parallel with other tests')
@pytest.mark.destructive
@pytest.mark.test_all_runtimes
def test_build_layer_reuse(cli, runtime, data_dir, ee_tag, tmp_path):
Expand Down
2 changes: 1 addition & 1 deletion test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage
flake8==6.1.0
mypy==1.6.0
pytest
pytest==8.1.1
pytest-cov
pytest-mock
pytest-xdist
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,19 +22,19 @@ 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
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 =
Expand Down

0 comments on commit 312a812

Please sign in to comment.