/
tox.ini
49 lines (43 loc) · 1.03 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
[tox]
envlist =
py{37,38,39}-pytest{4,5,6,7}-{linux,windows}
py{310,311,312}-pytest{6,7}-{linux,windows}
pkg
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
windows-latest: windows
PYTEST_MAJOR_VERSION =
4: pytest4
5: pytest5
6: pytest6
7: pytest7
[testenv]
deps =
-rrequirements.txt
pytest4: pytest>=4.0.0,<5.0.0
pytest5: pytest>=5.0.0,<6.0.0
pytest6: pytest>=6.0.0,<7.0.0
pytest7: pytest>=7.0.0,<7.4.0
commands = {envpython} -m pytest
[testenv:pkg]
skip_install = true
deps =
twine
build
commands =
{envpython} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{toxinidir}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
{envpython} -m build --outdir {toxinidir}/dist/ {toxinidir}
{envpython} -m twine check --strict dist/*