-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
51 lines (44 loc) · 1.16 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[tox]
min_version = 4.20
env_list = clean, lint, format, type-check, test, build
[testenv]
passenv = UV*, HOME, USERNAME
[testenv:clean]
description = Remove Python file artifacts
skip_install = true
changedir = {toxinidir}
allowlist_externals = uv, bash
ignore_errors = true
commands =
uv clean
bash -c "cd dist && rm -rf * .*"
bash -c "cd .mypy_cache && rm -rf * .*"
bash -c "cd .pytest_cache && rm -rf * .*"
bash -c "cd .ruff_cache && rm -rf * .*"
bash -c "cd .test && rm -rf * .*"
bash -c "cd junit && rm -rf * .*"
[testenv:lint]
description = Invoke "ruff check" under {base_python}
deps = ruff
commands =
ruff check --fix {posargs}
[testenv:format]
description = Invoke "ruff format" under {base_python}
deps = ruff
commands =
ruff format {posargs}
[testenv:type-check]
description = Invoke "mypy" under {base_python} for static type checking
deps = mypy
commands =
mypy {posargs}
[testenv:test]
description = Invoke "pytest" under {base_python} to run automated tests
deps = pytest
commands =
pytest tests
[testenv:build]
description = Invoke "hatch build" under {base_python}
deps = hatch
commands =
hatch build {posargs}