-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
67 lines (64 loc) · 1.57 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
[tox]
minversion = 4.0.2
ignore_path = tests
envlist =
lint
pkg
py
py-devel
requires =
tox-uv >= 1.16.0
[testenv]
usedevelop = true
description =
Run tests
devel: using devel branch of tox (unreleased)
skip_install = false
extras = test
deps =
devel: tox @ git+https://github.com/tox-dev/tox.git@main
passenv =
SSH_AUTH_SOCK
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
GIT_AUTHOR_NAME="John Doe"
GIT_COMMITTER_NAME="John Doe"
PIP_DISABLE_PIP_VERSION_CHECK = 1
commands =
python -m coverage run -m pytest {posargs}
sh -c "python -m coverage combine -q --data-file={env:COVERAGE_FILE} {env:COVERAGE_FILE}.* && coverage report && coverage xml"
allowlist_externals =
sh
rm
package = editable
[testenv:lint]
skip_install = true
description = Run linting
deps =
pre_commit
commands =
python -m pre_commit run {posargs:--all}
[testenv:pkg]
description =
Test packaging
# `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
pip
twine >= 4.0.1
setenv =
commands =
rm -rfv {toxinidir}/dist/
python -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
python -m twine check --strict {toxinidir}/dist/*
# Install the wheel
sh -c "python3 -m pip install {toxinidir}/dist/*.whl"