-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtox.ini
143 lines (130 loc) · 3.37 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
# SPDX-License-Identifier: MIT
[tox]
envlist =
py{27,35,36,38,39,310,311}-tox30
py{38,39,310,311,312,313}-tox40
black, isort, pylint, flake8, mypy, bandit, pydocstyle
shellcheck
skip_missing_interpreters = True
skipsdist = True
[testenv]
passenv = *
setenv =
PYTHONPATH=src
skip_install = True
description =
{envname}: Run unit tests for {envname}
deps =
safety ; python_version >= "3"
unittest2
pytest < 8
pytest-cov
coveralls
py
tox40: tox==4.*
tox30: tox==3.*
py27: mock
commands =
{env:SAFETY_CMD:safety} check -i 72236 -i 73456 -i 72132 -i 71064 -i 70612 -i 67599 -i 68477 -i 62044 -i 58755 -i 52495 -i 47833 -i 42559 -i 42218 -i 40291 -i 38765 -i 39611 -i 44492 -i 51457 -i 51499 --full-report # ignore pip, PyYAML problems
pytest --cov=tox_lsr --cov-report=term-missing tests
{env:COVERALLS_CMD:coveralls --output={envname}-coverage.txt}
[linters]
envdir = {toxworkdir}/env-linters
basepython = python3
[testenv:black]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run formatting checks
deps =
black
commands =
black --check --diff src/tox_lsr tests/unit
[testenv:isort]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run import order checks
deps =
isort
commands =
isort --diff -c src/tox_lsr tests/unit
[testenv:pylint]
envdir = {[linters]envdir}
setenv =
PYTHONPATH=src
basepython = {[linters]basepython}
description =
{envname}: Run static code checks
deps =
tox
unittest2
pylint
py
commands =
pylint setup.py src/tox_lsr
pylint -d C0115,C0116,C0321,E0611,R0903,W0613 \
stubs/pluggy/__init__.pyi \
stubs/tox/__init__.pyi stubs/tox/config/__init__.pyi \
stubs/tox/config/loader/__init__.pyi \
stubs/tox/config/loader/ini/__init__.pyi \
stubs/tox/config/source/__init__.pyi \
stubs/tox/plugin/__init__.pyi \
stubs/tox/session/__init__.pyi \
stubs/tox/version/__init__.pyi
pylint -d C0115,C0116,R0903 tests/unit
[testenv:flake8]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run style checks
deps =
flake8
flake8-logging-format
hacking==4.*
commands =
flake8 src/tox_lsr tests/unit
[testenv:mypy]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run type checks
deps =
py
types-setuptools
tox
mypy
commands =
mypy src/tox_lsr
[testenv:bandit]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run security analyzer
deps =
bandit
commands =
bandit -vlir setup.py src/tox_lsr stubs tests/unit
[testenv:pydocstyle]
envdir = {[linters]envdir}
basepython = {[linters]basepython}
description =
{envname}: Run doc strings checks
deps =
pydocstyle
commands =
pydocstyle --add-ignore=D203,D212 setup.py src/tox_lsr
pydocstyle --add-ignore=D101,D102,D103,D107,D203,D212 tests/unit
[coveralls]
basepython = python3
commands = python src/tox_lsr/test_scripts/custom_coveralls.py
[testenv:coveralls]
basepython = {[coveralls]basepython}
deps = coveralls
commands = {[coveralls]basepython}
[testenv:shellcheck]
allowlist_externals =
find
commands =
find src tests -name *.sh -exec shellcheck \
{env:SHELLCHECK_EXTRA_ARGS:} -e SC1090 '\{\}' ;