molecule-hetznercloud/tox.ini

74 lines
1.6 KiB
INI
Raw Normal View History

2020-04-24 08:59:03 +00:00
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
2019-10-23 11:04:57 +00:00
minversion = 3.14.0
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
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}
deps =
2020-04-24 08:59:03 +00:00
ansible>=2.9,<2.10
extras =
test
commands =
python -m pytest {posargs}
2020-04-24 08:59:03 +00:00
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
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/*