-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
tox.ini
64 lines (61 loc) · 1.28 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
[tox]
minversion = 4.0.0b2
envlist =
lint
pkg
py
isolated_build = True
[testenv]
usedevelop = True
# do not put * in passenv as it may break builds do to reduced isolation
passenv =
CI
GITHUB_*
HOME
PIP_*
PUBLISH
PYTEST_*
SSH_AUTH_SOCK
TERM
setenv =
PIP_DISABLE_VERSION_CHECK=1
PYTEST_REQPASS=9
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
commands =
python -m pytest
extras =
rich
test
allowlist_externals =
find
rm
sh
[testenv:lint]
description = Runs all linting tasks
commands =
# to run a single linter you can do "pre-commit run flake8"
python -m pre_commit run {posargs:--all}
deps = pre-commit>=1.18.1
extras =
skip_install = true
usedevelop = false
[testenv:pkg]
description =
Do packaging/distribution. If tag is not present or PEP440 compliant upload to
PYPI could fail
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false
# don't install package in this env
skip_install = true
deps =
build >= 0.9.0
twine >= 3.2.0 # pyup: ignore
setenv =
commands =
rm -rfv {toxinidir}/dist/
python -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
sh -c "python -m twine check --strict {toxinidir}//dist/*"