2020-04-24 08:59:03 +00:00
|
|
|
# For more information about tox, see https://tox.readthedocs.io/en/latest/
|
2019-09-27 20:00:44 +00:00
|
|
|
[tox]
|
2019-10-23 11:04:57 +00:00
|
|
|
minversion = 3.14.0
|
2019-09-27 20:00:44 +00:00
|
|
|
envlist =
|
2020-04-24 08:59:03 +00:00
|
|
|
linters
|
|
|
|
packaging
|
2020-04-27 11:00:46 +00:00
|
|
|
py{36,37,38}
|
2020-04-24 08:59:03 +00:00
|
|
|
devel
|
|
|
|
|
|
|
|
skipsdist = True
|
|
|
|
skip_missing_interpreters = False
|
2019-09-27 20:00:44 +00:00
|
|
|
isolated_build = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
|
|
|
passenv = *
|
|
|
|
setenv =
|
|
|
|
ANSIBLE_CALLABLE_WHITELIST={env:ANSIBLE_CALLABLE_WHITELIST:timer,profile_roles}
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
2019-11-16 01:06:17 +00:00
|
|
|
PYTEST_ADDOPTS=molecule_hetznercloud/test/unit/ --cov={toxinidir}/molecule_hetznercloud/ --no-cov-on-fail {env:PYTEST_ADDOPTS:-n auto}
|
2019-09-27 20:00:44 +00:00
|
|
|
deps =
|
2020-04-24 08:59:03 +00:00
|
|
|
ansible>=2.9,<2.10
|
2019-09-27 20:00:44 +00:00
|
|
|
extras =
|
|
|
|
test
|
|
|
|
commands =
|
|
|
|
python -m pytest {posargs}
|
|
|
|
|
2020-04-24 08:59:03 +00:00
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
twine
|
|
|
|
pytest
|
|
|
|
pre-commit
|
|
|
|
|
|
|
|
[testenv:linters]
|
2019-09-27 20:00:44 +00:00
|
|
|
commands =
|
|
|
|
python -m pre_commit run {posargs:--all}
|
|
|
|
deps = pre-commit>=1.18.1
|
|
|
|
skip_install = true
|
|
|
|
usedevelop = false
|
2020-04-24 08:59:03 +00:00
|
|
|
|
|
|
|
[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/*
|