diff --git a/tox.ini b/tox.ini index 25c4cf4..9042496 100644 --- a/tox.ini +++ b/tox.ini @@ -3,9 +3,11 @@ requires = tox>=4.11.3 env_list = py + deps + docs lint + milestone pkg - docs skip_missing_interpreters = true [testenv] @@ -24,11 +26,11 @@ pass_env = TERM USER set_env = + !milestone: PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt COVERAGE_COMBINED = {envdir}/.coverage COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}} COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml FORCE_COLOR = 1 - PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt PRE_COMMIT_COLOR = always TERM = xterm-256color commands_pre = @@ -45,28 +47,21 @@ allowlist_externals = rm sh -[testenv:lint] -description = Enforce quality standards under {basepython} +[testenv:deps] +description = Bump all dependencies +base_python = python3.10 skip_install = true deps = - pre-commit + {[testenv:lint]deps} +extras = set_env = PIP_CONSTRAINT = /dev/null +commands_pre = commands = - pre-commit run --show-diff-on-failure --all-files - -[testenv:pkg] -description = - Do packaging/distribution -skip_install = true -deps = - build>=0.9 - twine >= 4.0.2 # pyup: ignore -set_env = -commands = - rm -rfv {toxinidir}/dist/ - python -m build --outdir {toxinidir}/dist/ {toxinidir} - sh -c "python -m twine check --strict {toxinidir}/dist/*" + -pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps + -pre-commit autoupdate + git diff --exit-code +env_dir = {toxworkdir}/lint [testenv:docs] description = Builds docs @@ -80,18 +75,34 @@ set_env = commands = mkdocs build {posargs:} -[testenv:deps] -description = Bump all dependencies -base_python = python3.10 +[testenv:lint] +description = Enforce quality standards under {basepython} skip_install = true deps = - {[testenv:lint]deps} -extras = + pre-commit set_env = PIP_CONSTRAINT = /dev/null -commands_pre = commands = - -pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps - -pre-commit autoupdate - git diff --exit-code -env_dir = {toxworkdir}/lint + pre-commit run --show-diff-on-failure --all-files + +[testenv:milestone] +description = + Run tests with ansible-core milestone branch and without dependencies constraints +deps = + ansible-core@ https://github.com/ansible/ansible/archive/milestone.tar.gz +set_env = + {[testenv]set_env} + PIP_CONSTRAINT = /dev/null + +[testenv:pkg] +description = + Do packaging/distribution +skip_install = true +deps = + build>=0.9 + twine >= 4.0.2 # pyup: ignore +set_env = +commands = + rm -rfv {toxinidir}/dist/ + python -m build --outdir {toxinidir}/dist/ {toxinidir} + sh -c "python -m twine check --strict {toxinidir}/dist/*"