-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
68 lines (56 loc) · 1.4 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[tox]
requires =
tox>=4
envlist =
lint
{py39,py310,py311}-test
combine-test-reports
isolated_build = True
[gh-actions]
python =
3.9: py39, lint
3.10: py310
3.11: py311
[testenv:lint]
description = Run static checkers.
basepython = py39
extras = lint
commands =
ruff format . --check
ruff check .
mypy .
# Check formatting
# Lint code and docstrings
# Check type hinting
[testenv:{py39,py310,py311}-test]
description = Run doc tests and unit tests.
package = wheel
extras = test
setenv =
PY_IGNORE_IMPORTMISMATCH=1 # https://github.com/pytest-dev/pytest/issues/2042
COVERAGE_FILE = reports{/}.coverage.{envname}
commands =
# Run tests and doctests from .py files
pytest --junitxml=reports/pytest.xml.{envname} {posargs}
[testenv:combine-test-reports]
description = Combine test and coverage data from multiple test runs.
skip_install = true
setenv =
COVERAGE_FILE = reports/.coverage
depends = {py39,py310,py311}-test
deps =
junitparser
coverage[toml]
commands =
junitparser merge --glob reports/pytest.xml.* reports/pytest.xml
coverage combine --keep
coverage html
[testenv:docs]
description = Test and build the docs.
extras = docs
allowlist_externals = sphinx-build
commands = sphinx-build -b html -d "docs/build/doctrees" "docs" "docs/build/html"
[testenv:build]
description = Build the package.
extras = build
commands =