Initialise bootstrapping of repository
Missing tests but most of the copy/pasta is done.
This commit is contained in:
102
tox.ini
Normal file
102
tox.ini
Normal file
@ -0,0 +1,102 @@
|
||||
[tox]
|
||||
minversion = 3.12.0
|
||||
envlist =
|
||||
lint
|
||||
check
|
||||
py{27,35,36,37}-ansible{27,28,29}
|
||||
doc
|
||||
devel
|
||||
skipdist = True
|
||||
skip_missing_interpreters = True
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
# Hotfix for https://github.com/pypa/pip/issues/6434
|
||||
# Resolved by https://github.com/tox-dev/tox/issues/1276
|
||||
install_command =
|
||||
python -c 'import subprocess, sys; pip_inst_cmd = sys.executable, "-m", "pip", "install"; subprocess.check_call(pip_inst_cmd + ("pip<19.1", )); subprocess.check_call(pip_inst_cmd + tuple(sys.argv[1:]))' {opts} {packages}
|
||||
usedevelop = True
|
||||
passenv = *
|
||||
setenv =
|
||||
ANSIBLE_CALLABLE_WHITELIST={env:ANSIBLE_CALLABLE_WHITELIST:timer,profile_roles}
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
deps =
|
||||
ansible27: ansible>=2.7,<2.8
|
||||
ansible28: ansible>=2.8,<2.9
|
||||
ansible29: ansible>=2.9.0b1,<2.10
|
||||
devel: ansible>=2.9.0b1
|
||||
devel: docker
|
||||
extras =
|
||||
test
|
||||
commands =
|
||||
pip check
|
||||
devel: pip install -e "git+https://github.com/ansible/molecule.git#egg=molecule"
|
||||
python -m pytest {posargs}
|
||||
whitelist_externals =
|
||||
find
|
||||
sh
|
||||
|
||||
[testenv:lint]
|
||||
commands =
|
||||
# to run a single linter you can do "pre-commit run flake8"
|
||||
python -m pre_commit run {posargs:--all}
|
||||
deps = pre-commit>=1.18.1
|
||||
extras =
|
||||
skip_install = true
|
||||
usedevelop = false
|
||||
|
||||
[testenv:check]
|
||||
envdir = {toxworkdir}/py36-ansible28
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
collective.checkdocs==0.2
|
||||
twine==1.14.0
|
||||
usedevelop = False
|
||||
commands =
|
||||
python -m pytest --collect-only
|
||||
python -m setup checkdocs check --metadata --restructuredtext --strict --verbose
|
||||
python -m twine check .tox/dist/*
|
||||
|
||||
[testenv:build-docker]
|
||||
platform = ^darwin|^linux
|
||||
usedevelop = False
|
||||
skip_install = True
|
||||
deps =
|
||||
setuptools_scm==3.3.3
|
||||
packaging # pyup: ignore
|
||||
commands_pre =
|
||||
commands =
|
||||
python ./utils/build-docker.py
|
||||
whitelist_externals =
|
||||
sh
|
||||
|
||||
[testenv:build-dists-local]
|
||||
description =
|
||||
Generate dists which may be not ready
|
||||
for upload to PyPI because of
|
||||
containing PEP440 local version part
|
||||
usedevelop = false
|
||||
skip_install = true
|
||||
deps =
|
||||
pep517 >= 0.5.0
|
||||
setenv =
|
||||
commands =
|
||||
python -m pep517.build \
|
||||
--source \
|
||||
--binary \
|
||||
--out-dir {toxinidir}/dist/ \
|
||||
{toxinidir}
|
||||
|
||||
[testenv:build-dists]
|
||||
description = Generate dists ready for upload to PyPI
|
||||
usedevelop = {[testenv:build-dists-local]usedevelop}
|
||||
skip_install = {[testenv:build-dists-local]skip_install}
|
||||
deps = {[testenv:build-dists-local]deps}
|
||||
setenv =
|
||||
PYPI_UPLOAD = true
|
||||
commands =
|
||||
rm -rfv {toxinidir}/dist/
|
||||
{[testenv:build-dists-local]commands}
|
||||
whitelist_externals =
|
||||
rm
|
||||
{[testenv]whitelist_externals}
|
||||
Reference in New Issue
Block a user