Newer
Older
[tox]
envlist =
{py35,py36,py37}-test
lint
sort
format
type
docs
skip_missing_interpreters = True
isolated_build = True
[testenv]
description = run the unit tests
passenv = *
deps =
pytest
pytest-cov
pytest-mock
requests-mock
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
basepython = py36
deps =
black
commands =
black {posargs:--check} librehosters_cli/ test/
[testenv:type]
description = type check the source
basepython = py37
deps =
mypy
commands =
mypy librehosters_cli/ test/
[testenv:docs]
description = build the documentation
deps =
sphinx
towncrier
commands =
python -m setup build_sphinx
[testenv:metadata-release]
description = validate the package metadata
commands =
twine check .tox/dist/*
[testenv:test-release]
description = make a test release
deps =
{[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
[testenv:prod-release]
description = make a production release
deps =
{[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload dist/*