-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
57 lines (53 loc) · 1.35 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
[tox]
envlist = py27,py35,py36,py37,py38,coverage,check
[testenv]
description = Run tests with coverage in {envname}
deps =
coverage
setenv =
# Use a unique data file to enable parallel runs
# Also supports combining in [testenv:coverage]
COVERAGE_FILE = .coverage.{envname}
commands =
coverage run -m pytest {posargs:tests}
[testenv:coverage]
# See related config and explanation in .coveragerc
description = Combine coverage data and generate reports
basepython = python3
skip_install = true
depends = py27,py38
deps =
coverage
setenv =
COVERAGE_FILE = .coverage
commands =
# Assuming failure means we've already combined .coverage.*
-coverage combine
coverage report
coverage html
[testenv:check]
description = Run pre-commit checks on all files
basepython = python3
deps =
pre-commit
twine
commands =
pre-commit run --all-files --show-diff-on-failure
twine check {distdir}/*
[testenv:release]
description =
Upload distribution to TestPyPI after building and checking.
For PyPI, run `tox -e release pypi`.
basepython = python3
skip_install = true
deps =
wheel
twine
setuptools_scm
keyring
commands =
python scripts/clean_release.py
python setup.py sdist bdist_wheel
twine check dist/*
python scripts/check_version.py
twine upload --repository {posargs:testpypi} dist/*