forked from argoproj-labs/hera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
73 lines (64 loc) · 1.7 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
69
70
71
72
73
[tox]
envlist = py{37,38,39,310},coverage,lint,typecheck,format
isolated_build = true
[pytest]
addopts = --durations=5 -vv
[coverage:run]
branch = true
parallel = true
omit =
src/hera/_task_input.py
[coverage:report]
exclude_lines =
if TYPE_CHECKING:
pragma: no cover
raise NotImplementedError()
skip_covered = True
show_missing = True
[coverage:paths]
source = src/hera
*/.tox/*/lib/python*/site-packages/hera
*/.tox/pypy*/site-packages/hera
*/.tox\*\Lib\site-packages\hera
*/src/hera
*\src\hera
[testenv]
wheel = true
setenv =
ENABLE_BDIST_EXT_MODULE = {env:ENABLE_BDIST_EXT_MODULE:no}
OS = {env:OS:}
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{env:OS}.{envname}}
whitelist_externals = poetry
commands =
poetry install
poetry run python -m pytest \
--cov "{envsitepackagesdir}/hera" \
--cov-config "{toxinidir}/tox.ini"
[testenv:coverage]
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
whitelist_externals = poetry
commands =
poetry install
poetry run coverage combine
poetry run coverage report -m
poetry run coverage xml -o {toxworkdir}/coverage.xml
poetry run coverage html -d {toxworkdir}/htmlcov
depends = py37, py38, py39, py310
[testenv:lint]
whitelist_externals = poetry
commands =
poetry install
poetry run pflake8 src
[testenv:format]
whitelist_externals = poetry
commands =
poetry install
poetry run black --verbose src tests examples conftest.py
poetry run isort src tests examples conftest.py
[testenv:typecheck]
skipsdist = True
whitelist_externals = poetry
commands =
poetry install
poetry run mypy --namespace-packages --explicit-package-bases -p hera