[tox] envlist = {py35,py36,py37}-test lint sort format type docs changelog 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 skipsdist = True deps = flake8 commands = flake8 {posargs} librehosters_cli/ test/ [testenv:sort] description = sort the source skipsdist = True deps = isort commands = isort {posargs:-rc -c} -sp setup.cfg librehosters_cli/ test/ [testenv:format] description = format the source basepython = python3.6 skipsdist = True deps = black commands = black {posargs:--check} librehosters_cli/ test/ [testenv:type] description = type check the source basepython = python3.7 skipsdist = True deps = mypy commands = mypy librehosters_cli/ test/ [testenv:docs] description = build the documentation skipsdist = True deps = sphinx commands = python -m setup build_sphinx [testenv:changelog] description = draft the changelog skipsdist = True deps = towncrier commands = towncrier --draft [testenv:metadata-release] description = validate the package metadata deps = twine commands = twine check .tox/dist/* [testenv:release] description = make a production release deps = {[testenv:metadata-release]deps} commands = python -m setup sdist bdist_wheel twine upload dist/*