forked from adobe-type-tools/psautohint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
106 lines (98 loc) · 2.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[tox]
envlist = py{27,36,37}-cov,coverage
minversion = 2.9.1
skip_missing_interpreters = true
[pytest]
norecursedirs = data
testpaths = tests
addopts =
-v
-r a
--exitfirst
[testenv]
description = run the tests with pytest under {basepython}
setenv =
COVERAGE_FILE={toxinidir}/.coverage.{envname}
deps =
-rrequirements.txt
tx: afdko
extras = testing
commands =
nocov: pytest -n {env:PYTEST_NUM_PROCESSES:auto} {posargs}
cov: pytest --cov="{envsitepackagesdir}/psautohint" --cov-config={toxinidir}/.coveragerc -n {env:PYTEST_NUM_PROCESSES:auto} {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:coverage-c]
description = generate coverage for C library
deps =
-rrequirements.txt
pytest-xdist
skip_install = true
setenv =
CFLAGS = --coverage
BUILD_DIR = {envdir}/build
LIB_DIR = {env:BUILD_DIR}/lib
PYTHONPATH = {env:PYTHONPATH:}{:}{env:LIB_DIR}
passenv = TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
changedir = {toxinidir}
commands =
python setup.py build --build-base {env:BUILD_DIR} --build-platlib {env:LIB_DIR}
pytest -n {env:PYTEST_NUM_PROCESSES:auto} {posargs}
[testenv:codecov]
description = upload Python 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:coverage-codecov-c]
description = generate C coverage data and upload to codecov (only run on CI)
deps =
{[testenv:coverage-c]deps}
codecov
skip_install = true
setenv = {[testenv:coverage-c]setenv}
passenv = {[testenv:coverage-c]passenv}
changedir = {toxinidir}
commands =
{[testenv:coverage-c]commands}
codecov --env {envname}
[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 =
python setup.py clean -a bdist_wheel