forked from hynek/structlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
108 lines (85 loc) · 2.15 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[flake8]
ignore = E203,W503,W504
# Keep docs in sync with docs env and .readthedocs.yml.
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, docs
3.9: py39, manifest, mypy
pypy3: pypy3
[tox]
# Currently, pypy3 is broken on macOS. Since we don't need it for coverage, we only test it in CI.
envlist = lint,mypy,{py36,py37,py38,py39}-threads,{py38,py39}-greenlets,py38-colorama,docs,pypi-description,manifest,coverage-report
isolated_build = True
[testenv:lint]
basepython = python3.8
skip_install = true
deps = pre-commit
passenv = HOMEPATH # needed on Windows
commands = pre-commit run --all-files
[testenv:mypy]
description = Check types
basepython = python3.9
extras = tests
deps = mypy
commands = mypy src typing_examples.py
[testenv]
extras = tests
deps =
greenlets: greenlet
threads,greenlets,colorama: twisted
setenv =
PYTHONHASHSEED = 0
commands = python -m pytest {posargs}
# For missing contextvars.
[testenv:py36-threads]
deps = twisted
setenv =
PYTHONHASHSEED = 0
commands = coverage run -m pytest {posargs}
[testenv:py38-colorama]
deps = colorama
setenv =
PYTHONHASHSEED = 0
commands = coverage run -m pytest {posargs}
[testenv:py38-greenlets]
deps =
greenlet
twisted
setenv =
PYTHONHASHSEED = 0
commands = coverage run -m pytest {posargs}
[testenv:docs]
# Keep basepython in sync with gh-actions and .readthedocs.yml.
basepython = python3.8
extras =
docs
passenv = TERM
setenv =
PYTHONHASHSEED = 0
commands =
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:pypi-description]
basepython = python3.8
skip_install = true
deps =
twine
pip >= 18.0.0
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:manifest]
skip_install = true
deps = check-manifest
commands = check-manifest
[testenv:coverage-report]
basepython = python3.8
deps = coverage[toml]
skip_install = true
parallel_show_output = true
depends = {py36,py37,py38,py39}-threads,{py38,py39}-greenlets,py38-colorama
commands =
coverage combine
coverage report