-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
89 lines (83 loc) · 1.91 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
[tox]
minversion = 4.0
envlist = py310, mypy, pre-commit
skip_missing_interpreters = true
[base]
setenv =
PYTHONHASHSEED = 100
[testenv]
package = wheel
deps =
-r requirements-test.txt
setenv =
{[base]setenv}
COV_CORE_CONFIG={toxinidir}{/}pyproject.toml
commands =
pytest -p 'no:cacheprovider' {tty:--color=yes} {posargs:-n auto --dist=load --cov --cov-report=html}
[testenv:check-build-sdist] # 'flit build' and 'python -m build' should generate the same tar
recreate = true
skip_install = true
deps =
flit >=3.7.1,<4
build
allowlist_externals =
bash
diff
find
mv
rm
setenv =
{[base]setenv}
SOURCE_DATE_EPOCH = 1577833200 # 01/01/2020
commands_pre =
-mv dist {envtmpdir}{/}dist.bak
commands =
python -m build --sdist --outdir {envtmpdir}{/}isolated-build-dist
flit build --format sdist
bash -ec 'diff $(find {envtmpdir}{/}isolated-build-dist -type f -name "*.tar.gz") $(find dist -type f -name "*.tar.gz")'
commands_post =
rm -rf dist
-mv {envtmpdir}{/}dist.bak dist
[testenv:build]
skip_install = true
deps =
build
twine
allowlist_externals =
cp
rm
setenv =
{[base]setenv}
passenv =
SOURCE_DATE_EPOCH
commands =
python -m build --outdir {envtmpdir}{/}dist
twine check --strict {envtmpdir}{/}dist{/}*
cp -a {envtmpdir}{/}dist{/}. {toxinidir}{/}dist
rm -rf {envtmpdir}{/}dist
[testenv:mypy]
skip_install = true
deps =
{[testenv]deps}
-r requirements.txt
-c requirements-dev.txt
mypy
allowlist_externals =
sed
setenv =
{[base]setenv}
commands =
mypy --config-file {toxinidir}{/}pyproject.toml {posargs:{toxinidir}{/}src {toxinidir}{/}tests {toxinidir}{/}demo.py}
[testenv:pre-commit]
skip_install = true
deps =
-c requirements-dev.txt
pre-commit
setenv =
{[base]setenv}
SKIP=mypy
passenv =
PRE_COMMIT_HOME
XDG_CACHE_HOME
commands =
pre-commit run {posargs:--all-files}