hypercore-crypto/tox.ini

89 lines
2.0 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
2019-10-06 13:14:09 +00:00
deps = flake8
commands = flake8 {posargs} hypercore_crypto/ test/
2019-08-07 06:31:30 +00:00
[testenv:sort]
description = sort the source
skipdist = True
2019-10-06 13:14:09 +00:00
deps = isort
commands = isort {posargs:-rc -c} -sp setup.cfg hypercore_crypto/ test/
2019-08-07 06:31:30 +00:00
[testenv:format]
description = format the source
skipdist = True
basepython = python3.7
2019-10-06 13:14:09 +00:00
deps = black
commands = black {posargs:--check} hypercore_crypto/ test/
2019-08-07 06:31:30 +00:00
[testenv:type]
description = type check the source
basepython = python3.7
skipdist = True
2019-10-06 13:14:09 +00:00
deps = mypy
commands = mypy hypercore_crypto/ test/
2019-08-07 06:31:30 +00:00
[testenv:docs]
description = build the documentation
skipdist = True
2019-08-07 06:31:30 +00:00
extras = docs
2019-10-06 13:14:09 +00:00
commands = python -m setup build_sphinx
2019-08-07 06:31:30 +00:00
2019-11-03 15:44:42 +00:00
[testenv:docs-livereload]
description = invoke sphinx-autobuild to build and reload the documentation
commands = python -m sphinx_autobuild documentation/source documentation/build
deps = sphinx-autobuild>=0.7.1,<1.0
extras = docs
2019-08-07 06:31:30 +00:00
[testenv:changelog]
2019-11-03 15:44:42 +00:00
description = draw up the new changelog
2019-08-07 06:31:30 +00:00
skipdist = True
2019-11-03 15:44:42 +00:00
passenv = VERSION
deps = towncrier
commands = towncrier --version={env:VERSION} {posargs}
2019-08-07 06:31:30 +00:00
[testenv:metadata-release]
description = validate the package metadata
2019-10-06 13:14:09 +00:00
deps = twine
2019-11-03 15:44:42 +00:00
commands =
rm -rf {toxworkdir}/dist
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
twine check {toxworkdir}/dist/*
whitelist_externals =
rm
2019-08-07 06:31:30 +00:00
[testenv:release]
description = make a release
2019-10-06 13:14:09 +00:00
deps = {[testenv:metadata-release]deps}
2019-08-07 06:31:30 +00:00
commands =
2019-11-03 15:44:42 +00:00
rm -rf {toxworkdir}/dist
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
2019-08-07 06:31:30 +00:00
twine upload {toxworkdir}/dist/*
2019-11-03 15:44:42 +00:00
whitelist_externals =
rm