Skip to content

Commit 3a5a579

Browse files
committed
add tox-uv python version compatibility testing
1 parent ccec94a commit 3a5a579

5 files changed

Lines changed: 560 additions & 157 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ wheels/
99
# Virtual environments
1010
.venv
1111

12+
# tox
13+
.tox/
14+
1215
# robot
1316
results/

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ A template for modern [Robot Framework](https://github.com/robotframework/robotf
1616
- [`vulture`](https://github.com/jendrikseipp/vulture) for finding dead code
1717
- [`pre-commit`](https://github.com/pre-commit/pre-commit) for preventing commiting bad quality code
1818
- Tests
19-
- [pytest](https://github.com/pytest-dev/pytest) [unit tests](https://github.com/fkromer/robotframework-dosomething/tree/master/utests)
20-
- Robot Framework [acceptance tests](https://github.com/fkromer/robotframework-dosomething/tree/master/atests)
19+
- [`pytest`](https://github.com/pytest-dev/pytest) [unit tests](https://github.com/fkromer/robotframework-dosomething/tree/master/utests)
20+
- `robot` [acceptance tests](https://github.com/fkromer/robotframework-dosomething/tree/master/atests)
21+
- [`tox-uv`](https://github.com/tox-dev/tox-uv)
22+
for compatibility testing with multiple versions of Python [which are not end-of-life](https://devguide.python.org/versions/#status-of-python-versions)
2123

2224
## Migration hints
2325

@@ -28,3 +30,9 @@ easily migrate to `uv`.
2830
## Project related references
2931

3032
- [https://forum.robotframework.org > Official RF Library template(s)?](https://forum.robotframework.org/t/official-rf-library-project-template-s/)
33+
34+
## Acknowledgements
35+
36+
This project is partially based on the
37+
[cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv/)
38+
repository.

atests/dummy.robot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
*** Settings ***
22
Library DoSomething
33

4+
*** Variables ***
5+
${MY_VAR} Hello World
6+
47
*** Test Cases ***
58
first
69
Hello World

pyproject.toml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
66
authors = [
7-
{ name = "Daniel Biehl", email = "dbiehl@live.de" },
8-
{ name = "Florian Kromer", email = "kromer-florian@protonmail.com" },
7+
{ name = "Your name", email = "your@email.com" },
98
]
109
classifiers = [
1110
"Development Status :: 4 - Beta",
1211
"Intended Audience :: Developers",
1312
"License :: OSI Approved :: MIT License",
1413
"Programming Language :: Python :: 3",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
1518
"Programming Language :: Python :: 3.13",
1619
"Framework :: Robot Framework :: Library"
1720
]
18-
requires-python = ">=3.13"
21+
requires-python = ">=3.9"
1922
dependencies = [
2023
"robotframework>=7.2.2",
2124
]
@@ -33,6 +36,30 @@ paths = ["src"]
3336
[tool.deptry.per_rule_ignores]
3437
DEP002 = ["robotframework"]
3538

39+
# https://tox.wiki/en/latest/config.html#pyproject-toml-ini
40+
[tool.tox]
41+
legacy_tox_ini = """
42+
[tox]
43+
skipsdist = true
44+
envlist = py39, py310, py311, py312, py313
45+
46+
[gh-actions]
47+
python =
48+
3.9: py39
49+
3.10: py310
50+
3.11: py311
51+
3.12: py312
52+
3.13: py313
53+
54+
[testenv]
55+
passenv = PYTHON_VERSION
56+
allowlist_externals = uv
57+
commands =
58+
uv sync --python {envpython}
59+
uv run robotcode robot .
60+
uv run pytest .
61+
"""
62+
3663
# https://docs.pytest.org/en/7.1.x/reference/reference.html#ini-options-ref
3764
[tool.pytest.ini_options]
3865
testpaths = ["utests"]
@@ -55,7 +82,8 @@ dev = [
5582
"deptry>=0.23.0",
5683
"pre-commit>=4.2.0",
5784
"pytest>=8.3.5",
58-
"robotcode[runner]>=1.0.3",
85+
"robotcode[all]>=1.2.0",
5986
"robotframework-tidy>=4.16.0",
6087
"ruff>=0.11.7",
88+
"tox-uv>=1.25.0",
6189
]

0 commit comments

Comments
 (0)