molecule-hetznercloud/tox.ini
Luke Murphy 7528a16dce
All checks were successful
continuous-integration/drone/push Build is passing
Get CI working with Drone
2020-04-24 13:04:35 +02:00

74 lines
1.6 KiB
INI

# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
minversion = 3.14.0
envlist =
linters
packaging
py{38}
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.9,<2.10
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>=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/*