[tox]
envlist=
  lint
  py{35,36,37,38,39}
  doc
  packaging

[testenv]
description = Runs unittests
deps=
    -rtest-requirements.txt
commands=
    {envpython} -m pytest {posargs:-v -n 4 --cov testinfra --cov-report xml --cov-report term test}
usedevelop=True
passenv=HOME TRAVIS DOCKER_CERT_PATH DOCKER_HOST DOCKER_TLS_VERIFY

[testenv:lint]
description = Performs linting tasks
deps=hacking
commands=flake8 {posargs}

[testenv:docs]
deps=-rdev-requirements.txt
commands=sphinx-build -W -b html doc/source doc/build

[testenv:packaging]
description = Validate project packaging
skip_install = true
setenv =
  PEP440_VERSION=true
deps=
  check-manifest
commands=
  {envpython} -m check_manifest {toxinidir}
  {envpython} setup.py sdist
  {envpython} setup.py bdist_wheel
