-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
67 lines (59 loc) · 1.48 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
[tox]
isolated_build = true
envlist = py{37,38,39,310,311},style,docs,minimal,isort,slotscheck
[testenv]
allowlist_externals =
poetry
setenv=
POETRY_VIRTUALENVS_CREATE=false
commands_pre=
poetry install -n -v --no-root --extras "requests aiohttp httpx" --only test
extras=
requests
aiohttp
httpx
[testenv:py310]
commands =
pytest -v --live --cov=snug {posargs}
[testenv:minimal]
extras=
commands=
pytest {posargs}
[testenv:style]
commands_pre=
poetry install -n -v --no-root --extras "requests aiohttp httpx" --only linting
commands=
black --check --diff src/ tests/
flake8 src/ tests/
[testenv:isort]
commands_pre=
poetry install -n -v --no-root --extras "requests aiohttp httpx" --only linting
commands=
isort --check-only --diff src/ tests/
[testenv:slotscheck]
commands_pre=
poetry install -n -v --no-root --extras "requests aiohttp httpx" --only linting
commands=
slotscheck -m snug
[testenv:docs]
deps=
-rdocs/requirements.txt
commands=
sphinx-build -W -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" \
--color -bhtml
python -c 'import pathlib; print("documentation available under " \
+ (pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html").as_uri())'
[coverage:run]
branch=True
[coverage:report]
fail_under=100
exclude_lines=
pragma: no cover
raise NotImplementedError
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, style, isort, slotscheck, docs
3.11: py311