-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
41 lines (36 loc) · 1.06 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
[tox]
envlist = lint, type, coverage, py{310, 311, 312, 313}-tests
[testenv]
description = Run Unit Tests
extras = test
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre =
{envpython} --version
commands =
coverage run -m pytest {posargs}
[testenv:py{310, 311, 312, 313}-tests]
commands_pre =
{envpython} --version
python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
[testenv:coverage]
description = Report Code Coverage
skip_install = true
deps = coverage
parallel_show_output = true
depends = py{310, 311, 312, 313}-tests
commands =
coverage combine
coverage report {posargs}
[testenv:lint]
description = Run Code Linters
extras = lint
commands =
ruff check --config pyproject.toml {posargs: src}
ruff format --check --config pyproject.toml {posargs: src}
pylint --rcfile pyproject.toml {posargs: src}
[testenv:type]
description = Static Type Analysis
extras = type
commands =
mypy --config-file pyproject.toml {posargs: src}