-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
64 lines (57 loc) · 1.45 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 = 4.0
envlist = py311, flake8
# add , mypy again
isolated_build = true
[gh-actions]
python =
3.11: py311, flake8
# TODO: add ,mypy again
[testenv]
setenv =
PYTHONPATH = {toxinidir}
passenv = VIRA*
deps =
-r{toxinidir}/requirements_dev.txt
commands =
pytest --basetemp={envtmpdir}
allowlist_externals =
git
sh
[testenv:flake8]
basepython = python3.11
deps = flake8
commands = flake8 src tests
[testenv:mypy]
basepython = python3.11
deps =
-r{toxinidir}/requirements_dev.txt
commands = mypy src
[testenv:packaging]
basepython = python3
description =
Build package, verify metadata, install package and assert behavior when ansible is missing.
deps =
build >= 0.7.0
twine
skip_install = true
# 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(r"{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"
# Check if cli was installed
vira_deep_copy --help
vira_copy --help
# Uninstall the wheel
{envpython} -m pip uninstall -y volvo-jira