Skip to content

Commit caec346

Browse files
committed
test: migrate from tox to hatch test matrices
Refs: KEH-282
1 parent 009d9c1 commit caec346

3 files changed

Lines changed: 29 additions & 40 deletions

File tree

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,35 @@ lint = [
7878
]
7979
manage = "tests/manage.py {args}"
8080

81+
[tool.hatch.envs.hatch-test]
82+
features = ["all"]
83+
matrix-name-format = "dj{value}"
84+
parallel = false
85+
randomize = true
86+
87+
[[tool.hatch.envs.hatch-test.matrix]]
88+
python = ["3.10", "3.11", "3.12"]
89+
django = ["4.2", "5.1", "5.2"]
90+
91+
[[tool.hatch.envs.hatch-test.matrix]]
92+
python = ["3.13"]
93+
django = ["5.1", "5.2"]
94+
95+
[[tool.hatch.envs.hatch-test.matrix]]
96+
python = ["3.14"]
97+
django = ["5.2"]
98+
99+
[tool.hatch.envs.hatch-test.overrides]
100+
matrix.django.dependencies = [
101+
{ value = "django~={matrix:django}" },
102+
]
103+
104+
[tool.hatch.envs.hatch-test.scripts]
105+
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
106+
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
107+
cov-combine = "coverage combine"
108+
cov-report = "coverage report"
109+
81110
[tool.hatch.envs.hatch-uv]
82111
dependencies = [
83112
"uv==0.11.2",

requirements-test.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)