forked from Jainbrt/kubetest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
99 lines (84 loc) · 2.17 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[tox]
envlist=py{36,37,38}
skip_missing_interpreters=True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38,lint
[testenv]
description=
run tests with pytest under {basepython}
basepython=
py36: python3.6
py37: python3.7
py38: python3.8
deps=
pip-tools
commands=
pip-sync {toxinidir}/requirements.txt {toxinidir}/requirements-test.txt
pip install -e .
; instead of running pytest with the pytest-cov plugin, we need
; to run coverage against pytest as seen below. this is because
; when the kubetest plugin is loaded, the kubetest package is
; loaded prior to running coverage against it. this means that
; lines that were hit were not marked as hit, since they were hit
; before the tests were started (e.g. on plugin import).
coverage run --parallel --source kubetest -m pytest -s {posargs:tests}
coverage combine
coverage html
coverage report
[testenv:deps]
description=
update the project's frozen dependencies (requirements.txt)
deps=
pip-tools
commands=
pip-compile --upgrade --output-file requirements.txt setup.py
pip-compile --upgrade --output-file requirements-test.txt test-requirements.in
[testenv:docs]
description=
build the documentation for kubetest
skiptdist=True
usedevelop=True
changedir=docs
deps=
sphinx
sphinx_rtd_theme
commands=
sphinx-build -W -b html . _build
[testenv:examples]
description=
run example tests with kubetest
deps=
pip-tools
commands=
pip-sync {toxinidir}/requirements.txt
pip install -e .
pytest -s examples --kube-log-level=info --kube-config=~/.kube/config
[testenv:lint]
description=
run linting checks against the source code
basepython=python3
deps=
isort>=5.0.0
flake8
twine>=1.12.0
commands=
isort --check --diff {posargs:kubetest tests}
flake8 --show-source --statistics {posargs:kubetest tests}
python setup.py sdist bdist_wheel
twine check dist/*
[testenv:publish]
description=
publish to pypi
basepython=python3
deps=
-r{toxinidir}/requirements.txt
twine>=1.5.0
passenv=
TWINE_USERNAME
TWINE_PASSWORD
commands=
python setup.py sdist bdist_wheel
twine upload dist/*