[tox]
envlist = py, lint, eslint, docs
skip_missing_interpreters = true

[testenv]
deps = pytest
commands = py.test --ignore=fuzzinator {posargs}
download = true

[testenv:cov]
deps = pytest-cov
commands = py.test --ignore=fuzzinator --cov=fuzzinator {posargs}
usedevelop = true

[testenv:lint]
deps =
    pylint
    pycodestyle
commands =
    pylint fuzzinator
    pycodestyle fuzzinator --ignore=E501,E241

[testenv:eslint]
deps =
skip_install = true
whitelist_externals =
    npm
    npx
commands =
    npm install --no-save eslint@6.8.0 eslint-plugin-jquery@1.5.1
    npx eslint fuzzinator/ui/wui/resources/static/scripts/

[testenv:docs]
deps =
extras = docs
commands = sphinx-build docs docs/_build -E
