-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathtox.ini
More file actions
108 lines (101 loc) · 2.91 KB
/
tox.ini
File metadata and controls
108 lines (101 loc) · 2.91 KB
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
107
108
[tox]
project_name = uharfbuzz
envlist = py3,py3-cov,coverage
skip_missing_interpreters = true
[testenv]
skip_install =
cov: true
!cov: false
deps =
pytest
cov: -rrequirements-dev.txt
changedir= {toxinidir}
setenv =
cov: PYTHONPATH=src/uharfbuzz
cov: CYTHON_ANNOTATE=1
cov: CYTHON_LINETRACE=1
commands =
!cov: pytest {posargs}
cov: python setup.py develop
cov: coverage run --parallel -m pytest {posargs}
[testenv:coverage]
skip_install = true
deps =
cython
coverage
diff_cover
setenv =
PYTHONPATH=src
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/main} {toxworkdir}/coverage.xml
[testenv:codecov]
skip_install = true
deps =
{[testenv:coverage]deps}
codecov
setenv = {[testenv:coverage]setenv}
passenv = TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
changedir = {toxinidir}
commands =
coverage combine
codecov --env TOXENV
[testenv:wheel]
description = build wheel package for upload to PyPI
skip_install = true
deps =
setuptools >= 36.4.0
pip >= 18.0
wheel >= 0.31.0
changedir = {toxinidir}
commands =
python -c 'import os, glob; whl = glob.glob(".tox/dist/*.whl"); whl and os.remove(whl[0])'
pip wheel --pre --no-deps --no-cache-dir --wheel-dir {distdir} --find-links {distdir} --no-binary {[tox]project_name} {[tox]project_name}
[testenv:docs]
description = build Sphinx docs, including API reference
deps = -r{toxinidir}/docs/requirements.txt
changedir = {toxinidir}
commands =
sphinx-build -j auto docs/source/ docs/build/
[testenv:pyodide]
description = build and test Pyodide wheel
# Emscripten SDK is cached globally by pyodide-build:
# Linux: ~/.pyodide-xbuildenv-{version}/{pyodide-version}/emsdk
# macOS: ~/Library/Caches/.pyodide-xbuildenv-{version}/{pyodide-version}/emsdk
skip_install = true
allowlist_externals =
bash
{envtmpdir}/.pyodide-venv/bin/pip
{envtmpdir}/.pyodide-venv/bin/python
deps =
pyodide-build
passenv =
HOME
changedir = {toxinidir}
commands =
# avoid re-downloading emsdk if already cached
bash -c '\
find_emsdk() { \
for p in "$HOME/.pyodide-xbuildenv"-*/*/emsdk "$HOME/Library/Caches/.pyodide-xbuildenv"-*/*/emsdk; do \
[ -d "$p" ] && echo "$p" && return; \
done; \
}; \
EMSDK=$(find_emsdk); \
[ -z "$EMSDK" ] && pyodide xbuildenv install-emscripten && EMSDK=$(find_emsdk); \
source "$EMSDK/emsdk_env.sh" 2>/dev/null && \
pyodide build --outdir {envtmpdir}/dist'
pyodide venv {envtmpdir}/.pyodide-venv
bash -c '{envtmpdir}/.pyodide-venv/bin/pip install pytest {envtmpdir}/dist/uharfbuzz*.whl'
{envtmpdir}/.pyodide-venv/bin/python -m pytest {posargs}
[pytest]
testpaths = tests/
addopts =
-v
-r a