Skip to content

Commit 2515052

Browse files
committed
Update test environment conditionals for Python/Ansible support
Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent 4c45700 commit 2515052

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

pyproject.toml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,44 @@ lint = [
4242
]
4343

4444
[tool.hatch.envs.hatch-test]
45+
matrix-name-format = "{variable}_{value}"
4546
extra-dependencies = [
4647
"pytest",
4748
"pytest-mock",
4849
"molecule",
4950
"molecule-plugins",
5051
"molecule-plugins[ec2]",
51-
"ansible-core<2.17", # For RHEL 8 support
52+
# "ansible-core<2.17", # For RHEL 8 support
5253
"cdpy @ git+https://github.com/cloudera-labs/cdpy@main#egg=cdpy",
5354
]
5455

56+
# Ansible 2.18 - Python >= 3.11
57+
[[tool.hatch.envs.hatch-test.matrix]]
58+
python = ["3.13", "3.12", "3.11"]
59+
ansible = ["2.18"]
60+
61+
# Ansible 2.17 - Python >= 3.10
62+
[[tool.hatch.envs.hatch-test.matrix]]
63+
python = ["3.13", "3.12", "3.11", "3.10"]
64+
ansible = ["2.17"]
65+
66+
# Ansible 2.16 - Python >= 3.10
5567
[[tool.hatch.envs.hatch-test.matrix]]
56-
python = ["3.13", "3.12", "3.11", "3.10", "3.9"]
68+
python = ["3.13", "3.12", "3.11", "3.10"]
69+
ansible = ["2.16"]
70+
71+
# Ansible 2.15 - Python <= 3.12
72+
[[tool.hatch.envs.hatch-test.matrix]]
73+
python = ["3.12", "3.11", "3.10", "3.9"]
74+
ansible = ["2.15"]
75+
76+
[tool.hatch.envs.hatch-test.overrides]
77+
matrix.ansible.dependencies = [
78+
{ value = "ansible-core==2.18", if = ["2.18"] },
79+
{ value = "ansible-core==2.17", if = ["2.17"] },
80+
{ value = "ansible-core==2.16", if = ["2.16"] },
81+
{ value = "ansible-core==2.15", if = ["2.15"] },
82+
]
5783

5884
[tool.hatch.envs.docs]
5985
python = "3.12"

0 commit comments

Comments
 (0)