Skip to content

Commit

Permalink
Add milestone test (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
cidrblock authored Jun 3, 2024
1 parent cb1df4a commit 1f43dba
Showing 1 changed file with 40 additions and 29 deletions.
69 changes: 40 additions & 29 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ requires =
tox>=4.11.3
env_list =
py
deps
docs
lint
milestone
pkg
docs
skip_missing_interpreters = true

[testenv]
Expand All @@ -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 =
Expand All @@ -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
Expand All @@ -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/*"

0 comments on commit 1f43dba

Please sign in to comment.