burnham/application/tox.ini

61 строка
1.7 KiB
INI
Исходник Обычный вид История

2019-11-05 16:30:52 +03:00
[tox]
envlist = black, flake8, mypy, glinter, py310
isolated_build = False
[testenv]
# Use Python 3.10 for all test environments
basepython = python3.10
# Do not install burnham
skip_install = True
# We use pip-tools to install compatible packages
deps = pip-tools
2019-11-05 16:30:52 +03:00
commands_pre =
# Install the pinned burnham and development requirements
pip-sync {toxinidir}/requirements.txt {toxinidir}/dev-requirements.txt
# Build the burnham wheel and install it without package dependencies to
# ensure we use the pinned requirements rather than relying on pip to
# automatically resolve any version conflicts
pip install --no-deps .
2020-11-03 22:05:04 +03:00
# Verify installed packages have compatible dependencies
pip check -v
commands =
# Run the unit tests and report the current code coverage
coverage erase
coverage run -m pytest -v {posargs:tests}
coverage combine
coverage report
2019-11-05 16:30:52 +03:00
2020-11-02 15:06:52 +03:00
[testenv:black]
commands_pre =
# Install the pinned development requirements
pip-sync {toxinidir}/dev-requirements.txt
commands =
2022-01-25 13:51:41 +03:00
black --check --diff setup.py src/ tests/
2020-11-02 15:06:52 +03:00
2019-11-05 16:30:52 +03:00
[testenv:flake8]
commands_pre =
# Install the pinned development requirements
pip-sync {toxinidir}/dev-requirements.txt
commands =
flake8
2019-11-05 16:30:52 +03:00
[flake8]
max-line-length = 88
2019-11-05 16:30:52 +03:00
[testenv:mypy]
commands_pre =
# Install the pinned development requirements
pip-sync {toxinidir}/dev-requirements.txt
commands =
mypy setup.py src/ tests/
[testenv:glinter]
2021-11-02 15:17:23 +03:00
commands_pre =
# Install the pinned burnham requirements
pip-sync {toxinidir}/requirements.txt
commands =
glean_parser glinter --require-tags src/burnham/config/metrics.yaml src/burnham/config/pings.yaml src/burnham/config/tags.yaml