[tox]
envlist = lint,py27,py35,py36,py37,py38,docs

[testenv]
extras = tests
commands = pytest -s {posargs}
passenv = HOME SHELL CI

[testenv:lint]
deps = pre-commit~=1.14
skip_install = true
commands = pre-commit run --all-files

[testenv:docs]
deps = -rdocs/requirements.txt
extras =
commands = sphinx-build docs/ docs/_build {posargs}

; Below tasks are for development only (not run in CI)

[testenv:watch-docs]
deps =
  -rdocs/requirements.txt
  sphinx-autobuild
extras =
commands = sphinx-autobuild --open-browser docs/ docs/_build {posargs} --watch doitlive

[testenv:watch-readme]
deps = restview
skip_install = true
commands = restview README.rst
