-
Notifications
You must be signed in to change notification settings - Fork 70
/
tox.ini
68 lines (57 loc) · 1.63 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[tox]
envlist = test, combine_coverage, coverage_artifact, lint, docs, pre-commit # By default, use current python for pytest and linting
passenv = TOXENV CI GITLAB_* CODECOV_* TAP_* TARGET_* SAMPLE_*
skipsdist=True
isolated_build = true
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[testenv]
passenv = TOXENV CI GITLAB_* CODECOV_* TAP_* TARGET_* SAMPLE_*
whitelist_externals = poetry
commands_pre =
poetry install --no-root
commands =
poetry run coverage run --parallel -m pytest -x -v {posargs}
[testenv:test]
# Use default py interpreter
[testenv:doctest]
commands =
poetry run pytest --doctest-modules {posargs:singer_sdk}
[testenv:htmlcov]
# Launch local web browser with previously-captured pytest coverage results
whitelist_externals =
echo
poetry
open
commands_pre =
echo "Skipping install..."
commands =
poetry run coverage html
open ./htmlcov/index.html
[testenv:mypy]
commands =
poetry run mypy singer_sdk --exclude='tests'
[testenv:lint]
commands =
poetry run black --check --diff singer_sdk/ tests/ samples/
poetry run isort --check singer_sdk tests samples
poetry run flake8 singer_sdk tests samples
[testenv:pre-commit]
whitelist_externals = pre-commit
commands_pre =
pre-commit install
commands =
pre-commit run --all
[testenv:docs]
commands_pre =
poetry install --no-root -E docs
commands =
poetry run sphinx-build docs build -W
[testenv:combine_coverage]
commands =
poetry run coverage combine
poetry run coverage report --show-missing
[testenv:coverage_artifact]
commands =
poetry run coverage {posargs:xml}