This repository has been archived by the owner on Jan 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathtox.ini
71 lines (66 loc) · 1.97 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
[tox]
envlist = py{27,37}-cov,py{27,37}-cov-lxml,coverage
minversion = 2.9.1
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest under {basepython}
setenv =
COVERAGE_FILE={toxinidir}/.coverage.{envname}
deps =
-rrequirements.txt
lxml: -rextra_requirements.txt
extras = testing
commands =
python --version
python -c "import struct; print('%s-bit' % (struct.calcsize('P') * 8))"
nocov: pytest {posargs}
cov: pytest --cov="{envsitepackagesdir}/ufoLib" --cov-config={toxinidir}/.coveragerc {posargs}
[testenv:coverage]
description = run locally after tests to combine coverage data and create reports;
generates a diff coverage against origin/master (or DIFF_AGAINST env var)
deps =
coverage >= 4.4.1, < 5
diff_cover
skip_install = true
setenv =
COVERAGE_FILE={toxinidir}/.coverage
passenv =
DIFF_AGAINST
changedir = {toxinidir}
commands =
coverage erase
coverage combine
coverage report
coverage xml -o {toxworkdir}/coverage.xml
coverage html
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
[testenv:codecov]
description = upload coverage data to codecov (only run on CI)
deps =
{[testenv:coverage]deps}
codecov
skip_install = true
setenv = {[testenv:coverage]setenv}
passenv = TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
changedir = {toxinidir}
commands =
coverage combine
codecov --env TOXENV
[testenv:sdist]
description = build sdist to be uploaded to PyPI
skip_install = true
deps =
setuptools >= 36.4.0
wheel >= 0.31.0
changedir = {toxinidir}
commands =
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
python setup.py sdist --dist-dir dist
[testenv:wheel]
description = build wheel package for upload to PyPI
skip_install = true
deps = {[testenv:sdist]deps}
changedir = {toxinidir}
commands =
{[testenv:sdist]commands}
pip wheel -v --no-deps --no-index --no-cache-dir --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist ufoLib