-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
55 lines (49 loc) · 1.09 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
# SPDX-License-Identifier: Apache-2.0
[tox]
envlist=py3{10,11,12},lint,coverage-report
[testenv]
package = wheel
wheel_build_env = pkg
extras = test
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre =
py3{10,11,12}: {envpython} -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
commands =
coverage run -m pytest {posargs:tests}
[testenv:coverage-report]
description = Report coverage over all test runs.
basepython = py312
depends = py3{10,11,12}
deps = coverage[toml]
skip_install = true
parallel_show_output = true
commands =
coverage combine
coverage report
[testenv:lint]
basepython = python3
deps =
ruff
mypy
pytest-stub
commands =
ruff check src tests
ruff format --check src tests
mypy src tests
skip_install = true
skip_sdist = true
[testenv:fix]
basepython = python3
deps =
ruff
commands =
ruff format src tests
ruff check --fix src tests
skip_install = true
skip_sdist = true
[gh]
python =
3.12 = py312
3.11 = py311
3.10 = py310