File: tox.toml

package info (click to toggle)
anta 1.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,048 kB
  • sloc: python: 48,164; sh: 28; javascript: 9; makefile: 4
file content (76 lines) | stat: -rw-r--r-- 1,676 bytes parent folder | download | duplicates (2)
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
69
70
71
72
73
74
75
76
################################
# Tox
# Not in pyproject.toml because: 
# https://github.com/mbarkhau/bumpver/issues/247
################################
requires = ["tox>=4.21", "tox-gh-actions"]
env_list = [
  "clean",
  "lint",
  "type",
  "py310",
  "py311",
  "py312",
  "py313",
  "py314",
  "report"
]
# https://github.com/ymyzk/tox-gh-actions/issues/198
# Consider moving to tox-gh instead of tox-gh-actions

[gh-actions]
python = """
  3.10: py310
  3.11: clean, py311, report
  3.12: py312
  3.13: py313
  3.14: py314
"""

[env_run_base]
description = "Run pytest with {basepython}"
extras = ["cli"]
dependency_groups = ["dev"]
# posargs allows to run only a specific test using tox -e <env> -- path/to/my/test::test
commands = [["pytest", { replace = "posargs", extend = true }]]
# To test on non-POSIX system
# https://github.com/tox-dev/tox/issues/1455
passenv = ["USERNAME"]
# New tox is breaking column width set in our tests..
set_env = { COLUMNS = "165"}

[env.lint]
description = "Check the code style"
commands =[
  ["ruff", "check", "."],
  ["ruff", "format", ".", "--check"],
  ["pylint", "anta"],
  ["pylint", "tests"],
  ["pylint", "asynceapi"],
]

[env.type]
description = "Check typing"
commands =[
  ["pyright", "anta"],
  ["pyright", "tests"],
  ["pyright", "asynceapi"],
]

[env.clean]
skip_install=true
description = "Clean existing coverage"
commands =[
  ["coverage", "erase"],
]

[env.report]
description = "Generate coverage report"
skip_install=true
deps = ["coverage[toml]"]
commands = [
  ["coverage", "--version"],
  ["coverage", "html", "--rcfile=pyproject.toml"],
  ["coverage", "xml", "--rcfile=pyproject.toml"],
]
depends = ["py311"]