fea89041b8
This way, our log messages (and those from our stack) will show up in case of errors or test failures, which makes debugging easier.
52 lines
1.2 KiB
INI
52 lines
1.2 KiB
INI
[tox]
|
|
# the versions specified here are overridden by github workflow
|
|
envlist = lint, mypy, py{37,38,39,310,311}
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
deps =
|
|
pytest
|
|
pytest-mock
|
|
commands =
|
|
pytest {toxinidir}/check_patroni {toxinidir}/tests {posargs:-vv --log-level=debug}
|
|
|
|
[testenv:lint]
|
|
skip_install = True
|
|
deps =
|
|
codespell
|
|
black
|
|
flake8
|
|
isort
|
|
commands =
|
|
codespell {toxinidir}/check_patroni {toxinidir}/tests {toxinidir}/docs/ {toxinidir}/RELEASE.md {toxinidir}/CONTRIBUTING.md
|
|
black --check --diff {toxinidir}/check_patroni {toxinidir}/tests
|
|
flake8 {toxinidir}/check_patroni {toxinidir}/tests
|
|
isort --check --diff {toxinidir}/check_patroni {toxinidir}/tests
|
|
|
|
[testenv:mypy]
|
|
deps =
|
|
mypy == 0.961
|
|
commands =
|
|
# we need to install types-requests
|
|
mypy --install-types --non-interactive {toxinidir}/check_patroni
|
|
|
|
[testenv:build]
|
|
deps =
|
|
wheel
|
|
setuptools
|
|
twine
|
|
allowlist_externals =
|
|
rm
|
|
commands =
|
|
rm --verbose --recursive --force {toxinidir}/dist/
|
|
python -m build
|
|
python -m twine check dist/*
|
|
|
|
[testenv:upload]
|
|
# requires a check_patroni section in ~/.pypirc
|
|
skip_install = True
|
|
deps =
|
|
twine
|
|
commands =
|
|
python -m twine upload --repository check_patroni dist/*
|