-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
179 lines (159 loc) · 3.65 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
[tox]
envlist =
pre-commit
py37
py37-{setproctitle,uvloop}
py38
py38-{setproctitle,uvloop}
py39
py39-{setproctitle,uvloop}
py310
py310-{setproctitle,uvloop}
pypy3
pypy3-{setproctitle,uvloop}
pyston-3
pyston-3-{setproctitle,uvloop}
build
docs
lint
man
poetry
publish
setuppy
shellcheck
coverage-report
watch
isolated_build = True
[gh-actions]
python =
3.7: py37, py37-{setproctitle,uvloop}
3.8: py38, py38-{setproctitle,uvloop}
3.9: py39, py39-{setproctitle,uvloop}
3.10: py310, py310-{setproctitle,uvloop}
pypy-3.7: pypy3, pypy3-{setproctitle,uvloop}
pyston-3: pyston-3, pyston-3-{setproctitle,uvloop}
[testenv]
setenv = VIRTUALENV_NO_DOWNLOAD=1
parallel_show_output = true
deps =
setproctitle: setproctitle
uvloop: uvloop
extras = tests
commands = coverage run --parallel -m pytest \
--cache-clear \
--verbose blackhole tests
[testenv:{py37,py37-setproctitle,py37-uvloop}]
basepython = python3.7
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:{py38,py38-setproctitle,py38-uvloop}]
basepython = python3.8
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:{py39,py39-setproctitle,py39-uvloop}]
basepython = python3.9
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:{py310,py310-setproctitle,py310-uvloop}]
basepython = python3.10
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:{pypy3,pypy3-setproctitle,pypy3-uvloop}]
basepython = pypy3
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:{pyston-3,pyston-3-setproctitle,pyston-3-uvloop}]
basepython = pyston3
extras = tests
setenv = PYTHONWARNINGS=d
[testenv:watch]
extras = tests
deps =
pytest-testmon
pytest-watch
commands = ptw -- --testmon \
--cache-clear \
--verbose blackhole tests
[testenv:build]
skip_install = True
deps = poetry
commands = poetry build
[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
coverage combine
coverage xml
coverage report
[testenv:docs]
extras = docs
changedir = docs/source
commands =
sphinx-build -j 4 -d {envtmpdir}/doctrees . {envtmpdir}/html -c .
[testenv:lint]
skip_install = true
extras = tests
deps =
black
flake8
flake8-bugbear
isort>=4.2.5,<5
flake8-isort
flake8-commas
pyroma
interrogate
bandit
pydocstyle
doc8
codespell
vulture
commands =
flake8 blackhole tests setup.py docs/source/conf.py
black --check --verbose blackhole tests setup.py docs/source/conf.py
interrogate blackhole
pyroma .
bandit -r blackhole
pydocstyle blackhole
doc8 docs/source
codespell --skip="./.tox,./docs/source/_extra,./docs/source/_static,./.git/hooks/pre-commit"
vulture --min-confidence 100 blackhole tests
[testenv:man]
skip_install = True
deps = docutils
commands =
rst2man.py man/source/blackhole.rst {envtmpdir}/blackhole.1
rst2man.py man/source/blackhole_config.rst {envtmpdir}/blackhole_config.1
[testenv:manifest]
deps = check-manifest
skip_install = true
commands = check-manifest
[testenv:poetry]
skip_install = True
deps = poetry
commands =
poetry check
poetry install
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --verbose
[testenv:publish]
skip_install = True
deps = poetry
commands =
poetry build
poetry publish
[testenv:setuppy]
deps =
docutils
readme_renderer
skip_install = true
commands = python setup.py check -r -s -m
[testenv:shellcheck]
skip_install = true
whitelist_externals = shellcheck
commands = shellcheck -x \
scripts/minify.sh \
scripts/update-libuv.sh \
bash-completion/blackhole-completion.bash \
init.d/debian-ubuntu/blackhole