summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:38:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:38:37 +0000
commitedb762c8af1ace09545c11f1342e8fe1abdae3b8 (patch)
tree642cd160bb22cc28e6672c1baea60a49476d71b2 /tox.ini
parentReleasing progress-linux version 24.5.1-1~progress7.99u1. (diff)
downloadpython-ansible-compat-edb762c8af1ace09545c11f1342e8fe1abdae3b8.tar.xz
python-ansible-compat-edb762c8af1ace09545c11f1342e8fe1abdae3b8.zip
Merging upstream version 24.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tox.ini49
1 files changed, 21 insertions, 28 deletions
diff --git a/tox.ini b/tox.ini
index 6f6c82b..06f505d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,21 +1,15 @@
[tox]
-minversion = 4.0.0
+minversion = 4.6.3
envlist =
lint
pkg
docs
py
py-devel
- py39-ansible212
- py39-ansible213
py39-ansible214
py39-ansible215
- py310-ansible212
- py310-ansible213
py310-ansible214
py310-ansible215
- py311-ansible212
- py311-ansible213
py311-ansible214
py311-ansible215
py312-ansible216
@@ -30,18 +24,16 @@ requires =
description =
Run the tests
devel: ansible devel branch
- ansible212: ansible-core 2.12
- ansible213: ansible-core 2.13
ansible214: ansible-core 2.14
ansible215: ansible-core 2.15
ansible216: ansible-core 2.16
+ ansible217: ansible-core 2.17
deps =
- ansible212: ansible-core>=2.12,<2.13
- ansible213: ansible-core>=2.13,<2.14
ansible214: ansible-core>=2.14,<2.15
ansible215: ansible-core>=2.15,<2.16
ansible216: ansible-core>=2.16,<2.17
+ ansible217: ansible-core>=2.17,<2.18
devel: ansible-core @ git+https://github.com/ansible/ansible.git@c5d18c39d81e2b3b10856b2fb76747230e4fac4a # GPLv3+
# avoid installing ansible-core on -devel envs:
@@ -49,45 +41,46 @@ deps =
extras =
test
+
+commands_pre =
+ # safety measure to assure we do not accidentally run tests with broken dependencies
+ {envpython} -m pip check
+ # cleaning needed to prevent errors between runs
+ sh -c "rm -f {envdir}/.coverage.* 2>/dev/null || true"
commands =
sh -c "ansible --version | head -n 1"
# We add coverage options but not making them mandatory as we do not want to force
# pytest users to run coverage when they just want to run a single test with `pytest -k test`
coverage run -m pytest {posargs:}
- sh -c "coverage combine -a -q --data-file=.coverage {toxworkdir}/.coverage.*"
# needed for upload to codecov.io
- -sh -c "COVERAGE_FILE= coverage xml --ignore-errors -q --fail-under=0"
- # needed for vscode integration due to https://github.com/ryanluker/vscode-coverage-gutters/issues/403
- -sh -c "COVERAGE_FILE= coverage lcov --ignore-errors -q --fail-under=0"
- sh -c "COVERAGE_FILE= coverage report"
+ {py,py39,py310,py311,py312,py313}: sh -c "coverage combine -q --data-file={envdir}/.coverage {envdir}/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --ignore-errors --fail-under=0 && COVERAGE_FILE={envdir}/.coverage coverage lcov --fail-under=0 --ignore-errors -q && COVERAGE_FILE={envdir}/.coverage coverage report --fail-under=0 --ignore-errors"
+ # lcov needed for vscode integration due to https://github.com/ryanluker/vscode-coverage-gutters/issues/403
# We fail if files are modified at the end
git diff --exit-code
-commands_pre =
- # safety measure to assure we do not accidentally run tests with broken dependencies
- {envpython} -m pip check
- # cleaning needed to prevent errors between runs
- sh -c "rm -f .coverage {toxworkdir}/.coverage.* 2>/dev/null || true"
passenv =
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
FORCE_COLOR
HOME
NO_COLOR
PYTEST_* # allows developer to define their own preferences
+ PYTEST_REQPASS # needed for CI
+ PYTHON* # PYTHONPYCACHEPREFIX, PYTHONIOENCODING, PYTHONBREAKPOINT,...
PY_COLORS
+ RTD_TOKEN
REQUESTS_CA_BUNDLE # https proxies
+ SETUPTOOLS_SCM_DEBUG
SSL_CERT_FILE # https proxies
+ SSH_AUTH_SOCK # may be needed by git
LANG
- LC_ALL
- LC_CTYPE
+ LC_*
setenv =
ANSIBLE_DEVEL_WARNING='false'
- COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
+ COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PIP_DISABLE_PIP_VERSION_CHECK = 1
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
PRE_COMMIT_COLOR = always
- PYTEST_REQPASS = 94
FORCE_COLOR = 1
allowlist_externals =
ansible
@@ -152,17 +145,17 @@ commands =
pip uninstall -y ansible-compat
[testenv:py]
-description = Run the tests with {basepython} ansible-core 2.12+
+description = Run the tests with {basepython} ansible-core 2.14+
deps =
{[testenv]deps}
- ansible-core>=2.12
+ ansible-core>=2.14
[testenv:rpm]
description = Use packit to build RPM (requires RPM based Linux distro)
deps =
packitos
commands =
- packit build in-mock
+ sh -c "packit build in-mock --root=fedora-40-$(arch)"
[testenv:docs]
description = Build docs