-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathtox.ini
More file actions
68 lines (62 loc) · 1.36 KB
/
tox.ini
File metadata and controls
68 lines (62 loc) · 1.36 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[tox]
min_version = 4.0
env_list = py3{10,11,12,13,14,14t}
pypy{311}
graalpy3{11,12}
check, format, typecheck
[testenv]
labels = test
# wheel install
package = wheel
# wheel is universal so can use the same wheel for all envs
wheel_build_env = .pkg
# for extra deps
# extras =
allowlist_externals = cargo
deps =
pytest
pyyaml
./ua-parser-rs
./ua-parser-builtins
commands =
pytest -Werror --doctest-glob="*.rst" {posargs}
[testenv:py3{10,11,12,13,14}]
labels = test, cpy
deps =
pytest
pyyaml
google-re2
./ua-parser-rs
./ua-parser-builtins
[testenv:check]
labels = check
package = skip
deps = ruff
commands =
cargo clippy --manifest-path ua-parser-rs/Cargo.toml {posargs}
ruff check {posargs}
[testenv:format]
description = Runs the formatter (just showing errors by default)
labels = check
package = skip
deps = ruff
commands =
cargo fmt --manifest-path ua-parser-rs/Cargo.toml {posargs:--check}
ruff format {posargs:--diff}
[testenv:typecheck]
labels = check
package = skip
deps =
mypy
types-PyYaml
./ua-parser-rs
./ua-parser-builtins
commands =
cargo check --manifest-path ua-parser-rs/Cargo.toml
mypy {posargs}
[testenv:docs]
description = Builds the documentation
labels =
package = skip
deps = sphinx
commands = sphinx-build -M {posargs:html} doc docs/_build