Newer
Older
[tox]
envlist =
{py35,py36,py37}-test
lint
sort
format
type
docs
skip_missing_interpreters = True
[testenv]
description = run the unit tests
passenv = *
deps =
pytest >= 5.0.1, < 6.0
pytest-cov >= 2.7.1, < 3.0
pytest-mock >= 1.10.4, < 1.11
requests-mock >= 1.6.0, < 1.7
commands =
pytest test/ --cov={toxinidir}/librehosters_cli/ --no-cov-on-fail {posargs}
[testenv:lint]
description = lint the source
commands =
flake8 {posargs} librehosters_cli/ test/
[testenv:sort]
description = sort the source
commands =
isort {posargs:-rc -c} -sp setup.cfg librehosters_cli/ test/
[testenv:format]
description = format the source
commands =
black {posargs:--check} librehosters_cli/ test/
[testenv:type]
description = type check the source
commands =
mypy librehosters_cli/ test/
[testenv:docs]
description = build the documentation
commands =
python -m setup build_sphinx
[testenv:changelog]
description = draft the changelog
[testenv:metadata-release]
description = validate the package metadata
commands =
twine check .tox/dist/*
description = make a production release
deps =
{[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload dist/*