Skip to content

Commit 99fad2a

Browse files
authored
Add milestone test (#213)
1 parent 7ecb05d commit 99fad2a

File tree

1 file changed

+40
-29
lines changed

1 file changed

+40
-29
lines changed

tox.ini

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ requires =
33
tox>=4.11.3
44
env_list =
55
py
6+
deps
7+
docs
68
lint
9+
milestone
710
pkg
8-
docs
911
skip_missing_interpreters = true
1012

1113
[testenv]
@@ -24,11 +26,11 @@ pass_env =
2426
TERM
2527
USER
2628
set_env =
29+
!milestone: PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
2730
COVERAGE_COMBINED = {envdir}/.coverage
2831
COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
2932
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
3033
FORCE_COLOR = 1
31-
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
3234
PRE_COMMIT_COLOR = always
3335
TERM = xterm-256color
3436
commands_pre =
@@ -45,28 +47,21 @@ allowlist_externals =
4547
rm
4648
sh
4749

48-
[testenv:lint]
49-
description = Enforce quality standards under {basepython}
50+
[testenv:deps]
51+
description = Bump all dependencies
52+
base_python = python3.10
5053
skip_install = true
5154
deps =
52-
pre-commit
55+
{[testenv:lint]deps}
56+
extras =
5357
set_env =
5458
PIP_CONSTRAINT = /dev/null
59+
commands_pre =
5560
commands =
56-
pre-commit run --show-diff-on-failure --all-files
57-
58-
[testenv:pkg]
59-
description =
60-
Do packaging/distribution
61-
skip_install = true
62-
deps =
63-
build>=0.9
64-
twine >= 4.0.2 # pyup: ignore
65-
set_env =
66-
commands =
67-
rm -rfv {toxinidir}/dist/
68-
python -m build --outdir {toxinidir}/dist/ {toxinidir}
69-
sh -c "python -m twine check --strict {toxinidir}/dist/*"
61+
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
62+
-pre-commit autoupdate
63+
git diff --exit-code
64+
env_dir = {toxworkdir}/lint
7065

7166
[testenv:docs]
7267
description = Builds docs
@@ -80,18 +75,34 @@ set_env =
8075
commands =
8176
mkdocs build {posargs:}
8277

83-
[testenv:deps]
84-
description = Bump all dependencies
85-
base_python = python3.10
78+
[testenv:lint]
79+
description = Enforce quality standards under {basepython}
8680
skip_install = true
8781
deps =
88-
{[testenv:lint]deps}
89-
extras =
82+
pre-commit
9083
set_env =
9184
PIP_CONSTRAINT = /dev/null
92-
commands_pre =
9385
commands =
94-
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
95-
-pre-commit autoupdate
96-
git diff --exit-code
97-
env_dir = {toxworkdir}/lint
86+
pre-commit run --show-diff-on-failure --all-files
87+
88+
[testenv:milestone]
89+
description =
90+
Run tests with ansible-core milestone branch and without dependencies constraints
91+
deps =
92+
ansible-core@ https://github.com/ansible/ansible/archive/milestone.tar.gz
93+
set_env =
94+
{[testenv]set_env}
95+
PIP_CONSTRAINT = /dev/null
96+
97+
[testenv:pkg]
98+
description =
99+
Do packaging/distribution
100+
skip_install = true
101+
deps =
102+
build>=0.9
103+
twine >= 4.0.2 # pyup: ignore
104+
set_env =
105+
commands =
106+
rm -rfv {toxinidir}/dist/
107+
python -m build --outdir {toxinidir}/dist/ {toxinidir}
108+
sh -c "python -m twine check --strict {toxinidir}/dist/*"

0 commit comments

Comments
 (0)