hypercore-crypto/tox.ini

85 lines
1.5 KiB
INI
Raw Normal View History

2019-08-07 06:31:30 +00:00
[tox]
envlist =
2019-10-05 19:03:06 +00:00
{py36,py37}
2019-08-07 06:31:30 +00:00
lint
sort
format
type
docs
changelog
metadata-release
skip_missing_interpreters = True
isolated_build = True
[testenv]
description = run the unit tests
deps =
pytest
pytest-cov
pytest-mock
commands =
pytest test/ --cov={toxinidir}/hypercore_crypto/ --no-cov-on-fail {posargs}
[testenv:lint]
description = lint the source
skipdist = True
deps =
flake8
commands =
flake8 {posargs} hypercore_crypto/ test/
[testenv:sort]
description = sort the source
skipdist = True
deps =
isort
commands =
isort {posargs:-rc -c} -sp setup.cfg hypercore_crypto/ test/
[testenv:format]
description = format the source
skipdist = True
basepython = python3.7
deps =
black
commands =
black {posargs:--check} hypercore_crypto/ test/
[testenv:type]
description = type check the source
basepython = python3.7
skipdist = True
deps =
mypy
commands =
mypy hypercore_crypto/ test/
[testenv:docs]
description = build the documentation
2019-10-05 19:27:45 +00:00
skip_install=True
2019-08-07 06:31:30 +00:00
extras = docs
commands =
python -m setup build_sphinx
[testenv:changelog]
description = draft the changelog
skipdist = True
extras = changelog
commands =
towncrier --draft
[testenv:metadata-release]
description = validate the package metadata
deps =
twine
commands =
twine check .tox/dist/*
[testenv:release]
description = make a release
deps =
{[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload {toxworkdir}/dist/*