-
Notifications
You must be signed in to change notification settings - Fork 20
/
tox.ini
82 lines (73 loc) · 1.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
[tox]
min_version = 4
no_package = true
envlist =
check
doc8
docs
build-{lin,mac,win}
coverage
labels =
check = check,doc8
format = format
docs = docs
build = build-{lin,mac,win}
test = coverage
publish = publish-{lin,mac,win}
[doc8]
ignore = D002,D004
max-line-length = 80
[testenv]
description = Run test suite with code coverage
platform =
lin: linux
mac: darwin
win: win32
allowlist_externals = coverage
passenv = SPOTIFY*,TEKORE*
commands = coverage run
coverage report
[testenv:coverage]
; Inherit everything from testenv
[testenv:doc8]
description = Check documentation .rst files
allowlist_externals = doc8
commands = doc8 docs/src
[testenv:docs]
description = Build Sphinx documentation
allowlist_externals = sphinx-build
change_dir = docs
commands = sphinx-build -M html src build
[testenv:check]
description = Check code style
allowlist_externals = ruff
commands =
ruff format --check
ruff check
[testenv:format]
description = Format code
allowlist_externals = ruff
commands =
ruff format
ruff check --fix
[testenv:build-{lin,mac,win}]
description = Build and check package
deps = -r requirements/build
allowlist_externals = rm, cmd
commands =
python -m build
twine check --strict dist/*
commands_post =
lin,mac: rm -r dist
win: cmd /c rmdir /s /q dist
[testenv:publish-{lin,mac,win}]
description = Build, check and publish package
deps = -r requirements/build
allowlist_externals = rm, cmd
commands =
python -m build
twine check --strict dist/*
twine upload dist/* --config-file .pypirc
commands_post =
lin,mac: rm -r dist
win: cmd /c rmdir /s /q dist