-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
tox.ini
74 lines (70 loc) · 1.98 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
[tox]
minversion = 4.0.0
envlist =
lint
py
pkg
isolated_build = True
[testenv]
setenv =
PYTHONWARNINGS=error::FutureWarning
# Aim to replace with below once other issues are fixed:
# PYTHONWARNINGS=error
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
deps =
pytest
pytest-cov
sitepackages = False
usedevelop = True
commands = python -m pytest -ra --cov=src/ --no-cov-on-fail --cov-append --cov-report=xml:{toxworkdir}/coverage-{envname}.xml
[testenv:lint]
description = Runs all linting tasks
commands =
# to run a single linter you can do "pre-commit run flake8"
python -m pre_commit run {posargs:--all}
deps = pre-commit>=1.18.1
extras =
skip_install = true
usedevelop = false
[testenv:pkg]
description =
Do packaging/distribution. If tag is not present or PEP440 compliant upload to
PYPI could fail
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false
# don't install molecule itself in this env
skip_install = true
deps =
asciidoc >= 10.1.4
collective.checkdocs >= 0.2
build >= 0.7.0
pip >= 20.2.2
setuptools_scm >= 6.0.1
toml >= 0.10.1
twine >= 3.2.0 # pyup: ignore
setenv =
commands =
rm -rfv {toxinidir}/dist/
python -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
sh -c "python -m twine check --strict {toxinidir}/dist/*"
allowlist_externals =
rm
sh
[testenv:docs]
description = Generate Sphinx docs under build/docs
extras = docs
commands =
# Disabled due https://github.com/pycontribs/ansi2html/issues/193
; sh -c 'a2x \
; --verbose \
; --no-xmllint \
; --conf-file=man/asciidoc.conf \
; --attribute="manual_package=ansi2html" \
; --attribute="manual_title=ansi2html Manual" \
; --attribute="manual_version=$(python3 -m setuptools_scm)" \
; --format=manpage -D man \
; man/ansi2html.1.txt'
mkdocs {posargs:build --strict --site-dir=_readthedocs/html/}