forked from scrapy-plugins/scrapy-zyte-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
65 lines (57 loc) · 1.18 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
[tox]
envlist = py37,py38,py39,py310,mypy,isort,black,flake8
[testenv]
commands =
# this ugly hack is here because:
# https://github.com/tox-dev/tox/issues/149
pip install -q \
-r {toxinidir}/requirements.txt
pip install -q \
-r {toxinidir}/tests/requirements.txt
py.test \
--cov-report=html:coverage-html \
--cov-report=xml \
--cov=scrapy_zyte_api \
--junitxml=test-results/junit.xml \
--reactor=asyncio \
{posargs:scrapy_zyte_api tests}
[testenv:mypy]
deps =
mypy>=0.921
commands = mypy --ignore-missing-imports --no-warn-no-return scrapy_zyte_api tests
[testenv:flake8]
deps =
flake8
flake8-docstrings
flake8-print>=3.0.1
commands =
flake8 \
scrapy_zyte_api \
setup.py \
tests \
{posargs}
[testenv:black]
deps =
black
commands =
black \
scrapy_zyte_api \
setup.py \
tests/ \
{posargs}
[testenv:black-check]
deps =
{[testenv:black]deps}
commands =
{[testenv:black]commands} --diff
[testenv:isort]
deps = isort
commands =
isort \
scrapy_zyte_api/ \
setup.py \
tests/ \
{posargs}
[testenv:isort-check]
deps = {[testenv:isort]deps}
commands = {[testenv:isort]commands} -c