forked from cookiecutter/cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
70 lines (65 loc) · 1.51 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
[tox]
envlist =
lint
py36
py37
py38
py39
pypy3
minversion = 3.14.2
requires =
virtualenv >= 20.4.5
pip >= 21.1.1
[testenv]
passenv =
LC_ALL
LANG
HOME
commands =
pip install -e .
pytest --cov=cookiecutter --cov-report=term --cov-fail-under=100 --cov-branch {posargs:tests}
cov-report: coverage html
cov-report: coverage xml
deps = -rtest_requirements.txt
skip_install = true
[testenv:lint]
commands =
python -m pre_commit run {posargs:--all}
deps = pre-commit>=1.20.0
usedevelop = false
[testenv:docs]
commands =
pip install -e .
pip install -r test_requirements.txt
pip install -r docs/requirements.txt
make docs
whitelist_externals = make
[testenv:safety]
commands =
safety check --full-report
deps =
safety
[testenv:packaging]
description =
Build package, verify metadata, install package and assert behavior when ansible is missing.
deps =
build
twine
skip_install = true
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)'
# build using moder python build (PEP-517)
{envpython} -m build \
--sdist \
--wheel \
--outdir {toxinidir}/dist/ \
{toxinidir}
# Validate metadata using twine
twine check {toxinidir}/dist/*
# Install the wheel
sh -c "python3 -m pip install {toxinidir}/dist/*.whl"
whitelist_externals = sh