Testing configuration cleanup
This commit is contained in:
56
tox.ini
56
tox.ini
@ -1,10 +1,14 @@
|
||||
# For more information about tox, see https://tox.readthedocs.io/en/latest/
|
||||
[tox]
|
||||
minversion = 3.14.0
|
||||
envlist =
|
||||
lint
|
||||
py{37}-ansible{28}-unit
|
||||
skipdist = True
|
||||
skip_missing_interpreters = True
|
||||
linters
|
||||
packaging
|
||||
py{37}
|
||||
devel
|
||||
|
||||
skipsdist = True
|
||||
skip_missing_interpreters = False
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
@ -15,15 +19,55 @@ setenv =
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
PYTEST_ADDOPTS=molecule_hetznercloud/test/unit/ --cov={toxinidir}/molecule_hetznercloud/ --no-cov-on-fail {env:PYTEST_ADDOPTS:-n auto}
|
||||
deps =
|
||||
ansible28: ansible>=2.8,<2.9
|
||||
ansible>=2.9,<2.10
|
||||
extras =
|
||||
test
|
||||
commands =
|
||||
python -m pytest {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
whitelist_externals =
|
||||
bash
|
||||
twine
|
||||
pytest
|
||||
pre-commit
|
||||
|
||||
[testenv:linters]
|
||||
commands =
|
||||
python -m pre_commit run {posargs:--all}
|
||||
deps = pre-commit>=1.18.1
|
||||
skip_install = true
|
||||
usedevelop = false
|
||||
|
||||
[testenv:packaging]
|
||||
usedevelop = false
|
||||
skip_install = true
|
||||
deps =
|
||||
collective.checkdocs >= 0.2
|
||||
pep517 >= 0.5.0
|
||||
twine >= 2.0.0
|
||||
commands =
|
||||
bash -c "rm -rf {toxinidir}/dist/ && mkdir -p {toxinidir}/dist/"
|
||||
python -m pep517.build \
|
||||
--source \
|
||||
--binary \
|
||||
--out-dir {toxinidir}/dist/ \
|
||||
{toxinidir}
|
||||
twine check dist/*
|
||||
|
||||
[testenv:devel]
|
||||
description= Unit testing using master branches of molecule and ansible
|
||||
extras = test
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
deps =
|
||||
git+https://github.com/ansible/ansible.git#egg=ansible
|
||||
git+https://github.com/ansible/molecule#egg=molecule
|
||||
|
||||
[testenv:upload]
|
||||
description = Builds the packages and uploads them to https://pypi.org
|
||||
envdir={toxworkdir}/dist
|
||||
deps=
|
||||
{[testenv:packaging]deps}
|
||||
commands =
|
||||
{[testenv:packaging]commands}
|
||||
twine upload --verbose dist/*
|
||||
|
||||
Reference in New Issue
Block a user