molecule-hetznercloud/tox.ini

71 lines
1.6 KiB
INI

# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist =
linters
packaging
py{36,37,38,39}
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
PYTEST_ADDOPTS=molecule_hetznercloud/test/unit/ --cov={toxinidir}/molecule_hetznercloud/ --no-cov-on-fail {env:PYTEST_ADDOPTS:-n auto}
deps =
ansible>=2.10,<2.11
extras =
test
commands =
python -m pytest {posargs}
whitelist_externals =
bash
twine
pytest
pre-commit
[testenv:linters]
commands =
python -m pre_commit run {posargs:--all}
deps = pre-commit
skip_install = true
usedevelop = false
[testenv:packaging]
usedevelop = false
skip_install = true
deps =
collective.checkdocs
pep517
twine
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/*