-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
53 lines (46 loc) · 1.12 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
[pytest]
addopts = -ra
testpaths = tests
[gh-actions]
python =
3.8: py38, mypy, lint
3.9: py39, docs
[tox]
envlist = lint, mypy, {py38,py39}, docs, coverage-report
isolated_build = true
requires = tox-conda
[testenv]
description = Run tests and measure coverage.
extras = tests
commands =
{py38}: coverage run -m pytest {posargs}
{py38,py39}: python -m pytest --continue-on-collection-errors {posargs}
parallel_show_output = True
[testenv:lint]
description = Run all pre-commit hooks.
basepython = python3.8
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files
[testenv:mypy]
description = Check types
basepython = python3.8
extras = tests
deps = mypy
commands = mypy src
[testenv:docs]
description = Build docs and run doctests.
basepython = python3.9
extras = docs
changedir = docs
commands =
sphinx-build -M html "." "_build" -W --keep-going
sphinx-build -M doctest "." "_build" -W --keep-going
[testenv:coverage-report]
description = Report coverage over all test runs.
basepython = python3.8
deps = coverage[toml]>=5.5
skip_install = true
commands =
coverage combine
coverage report