-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
52 lines (47 loc) · 1.16 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
[tox]
minversion = 4.11.3
envlist = lint,pre-commit,py{38,39,310,311,312}
skip_missing_interpreters = True
requires =
tox >= 4.11.3
setuptools >= 68.2.2
[testenv]
skip_install = true
allowlist_externals =
rm
bash
deps =
-rrequirements.txt
commands =
pytest
pre-commit try-repo .
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:lint]
description = Performs linting, style checks, metadata-validation, packaging
skip_install = true
allowlist_externals =
rm
bash
deps =
pre-commit
build
twine
commands =
pre-commit run -a
bash -c "rm -rf {toxinidir}/dist/ && mkdir -p {toxinidir}/dist/"
python -m build --sdist --outdir {toxinidir}/dist/
python -m build --wheel --outdir {toxinidir}/dist/
twine check dist/*
[testenv:upload]
description = Builds the packages and uploads them to https://pypi.org
envdir={toxworkdir}/lint
deps={[testenv:lint]deps}
setenv =
TWINE_USERNAME=__token__
TWINE_PASSWORD={env:TWINE_PASSWORD}
commands =
{[testenv:lint]commands}
twine upload --disable-progress-bar --skip-existing --verbose dist/*