-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
62 lines (58 loc) · 1.34 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
[tox]
minversion = 2.0
envlist =
lint
packaging
py
skipsdist = True
isolated_build = true
[testenv]
description = Run tests
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
passenv =
TERM
HOME
deps =
--editable .
-r{toxinidir}/test-requirements.txt
# both options needed to workaround https://github.com/tox-dev/tox/issues/2197
usedevelop = false
skip_install = true
whitelist_externals =
bash
rm
sh
commands =
pip install -e .
rmux --help
rmux --version
rmux "df && exit"
rmux "df -h && exit"
[testenv:lint]
description = Lint the code
commands =
pre-commit run -a
[testenv:packaging]
description = Check packaging
deps =
build >= 0.7.0
twine
# Ref: https://twitter.com/di_codes/status/1044358639081975813
commands =
# build wheel and sdist using PEP-517
{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}
# Validate metadata using twine
twine check --strict {toxinidir}/dist/*
# Install the wheel
sh -c "python3 -m pip install {toxinidir}/dist/*.whl"
[testenv:venv]
commands = {posargs}