Skip to content

Commit d4bdfc5

Browse files
grstflying-sheep
andauthored
Test pre-release dependencies (#393)
Co-authored-by: Philipp A. <flying-sheep@web.de>
1 parent 636a80f commit d4bdfc5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,26 @@ scripts.build = "sphinx-build -M html docs docs/_build {args}"
7272
scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
7373
scripts.clean = "git clean -fdX -- {args:docs}"
7474

75+
# Test the lowest and highest supported Python versions with normal deps
7576
[[tool.hatch.envs.hatch-test.matrix]]
77+
deps = [ "stable" ]
7678
python = [ "3.10", "3.13" ]
79+
80+
# Test the newest supported Python version also with pre-release deps
81+
[[tool.hatch.envs.hatch-test.matrix]]
82+
deps = [ "pre" ]
83+
python = [ "3.13" ]
84+
7785
[tool.hatch.envs.hatch-test]
7886
features = [ "test" ]
7987

88+
[tool.hatch.envs.hatch-test.overrides]
89+
# If the matrix variable `deps` is set to "pre",
90+
# set the environment variable `UV_PRERELEASE` to "allow".
91+
matrix.deps.env-vars = [
92+
{ key = "UV_PRERELEASE", value = "allow", if = [ "pre" ] },
93+
]
94+
8095
[tool.ruff]
8196
line-length = 120
8297
src = [ "src" ]

0 commit comments

Comments
 (0)