-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
55 lines (48 loc) · 1.2 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
[tox]
envlist = py{38},flake8,bandit,unit_tests,mypy,black
skipsdist = True
[flake8]
ignore = E226,D203,D212,D213,D404,D100,D104,ANN101
max-line-length = 160
max-complexity = 15
exclude = .git/, ./venv/, ./.tox/, build/, test_button.egg-info/
# Not using type hints in tests, ignore all errors
per-file-ignores =
tests/*:ANN
[testenv:bandit]
skip_install = true
deps =
bandit
commands = bandit -r test_button/
[testenv:mypy]
skip_install = true
deps =
-rrequirements.txt
mypy
# Mypy fails if 3rd party library doesn't have type hints configured.
# Alternative to ignoring imports would be to write custom stub files, which
# could be done at some point.
commands = mypy --ignore-missing-imports test_button/
[testenv:black]
skip_install = true
deps =
black
commands = black . -l 120 --check
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-docstrings
flake8-annotations
commands = flake8 .
[testenv:unit_tests]
passenv = COVERALLS_REPO_TOKEN
deps =
.[test]
-rrequirements.txt
# Stop after first failure
commands = py.test -x --cov=test_button tests/
python {toxinidir}/tests/coveralls.py
[gh-actions]
python =
3.8: flake8, unit_tests, bandit, black, mypy