forked from spotify/klio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
66 lines (57 loc) · 1.6 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
[tox]
envlist = manifest,check-formatting,lint
[testenv]
install_command = python -m pip install {opts} {packages}
extras = tests
deps =
{toxinidir}/../core
{toxinidir}/../cli
commands =
coverage run -m pytest {posargs}
[testenv:manifest]
basepython = python3.7
deps = check-manifest
skip_install = true
commands = check-manifest
; This env just runs `black` and fails tox if it's not formatted correctly.
; If this env fails on, run `tox -e format` locally in order to apply changes.
[testenv:check-formatting]
basepython = python3.7
deps = black==19.10b0
skip_install = true
commands =
black src/klio_devtools tests --line-length 79 --diff --check
[testenv:format]
basepython = python3.7
deps = black==19.10b0
skip_install = true
commands =
black --line-length 79 src/klio_devtools tests
[testenv:lint]
basepython = python3.7
deps =
flake8
flake8-import-order
apache-license-check
skip_install = true
commands =
flake8
apache-license-check src tests setup.py --include-empty --copyright 'Spotify AB'
; tool-specific config below
[flake8]
show-source = true
max-line-length = 80
exclude = .venv,.tox,.git,dist,doc,*.egg,build,*_pb2.py
# comply with black
ignore = E203, W503
import-order-style = edited
application-import-names = tests,klio_devtools
; application-package-names = <any internal to the company packages, like klio>
[pytest]
addopts = -v --cov=klio_devtools --cov-report=xml:cobertura/coverage.xml --cov-report=term-missing
testpaths = tests
; required for mapping envs -> github runtimes
[gh-actions]
python =
3.7: py37, manifest, check-formatting, lint
3.8: py38