-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
95 lines (82 loc) · 2.59 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
[tox]
skipsdist = True
envlist = upgrade, {test_bundle_deployment}-{1.7,1.8}
[vars]
releases_test_path = {toxinidir}/tests-bundle/
test_path = {toxinidir}/tests
[testenv]
passenv =
KUBECONFIG
setenv =
PYTHONPATH={toxinidir}:{toxinidir}/src
PYTHONBREAKPOINT=ipdb.set_trace
# Needed for juju cli to work correctly
HOME={env:HOME}
[testenv:lint]
deps =
black
mdformat-gfm
commands =
black --check {toxinidir}/scripts/ {toxinidir}/tests/
mdformat --check --wrap=100 {toxinidir}/README.md
[testenv:fmt]
deps =
black
mdformat-gfm
commands =
black {toxinidir}/scripts/ {toxinidir}/tests/ {[vars]releases_test_path}
mdformat --wrap=100 {toxinidir}/README.md
[testenv:tests]
setenv =
# Needed to pass creds through environment variables
passenv =
KUBEFLOW_AUTH_USERNAME
KUBEFLOW_AUTH_PASSWORD
deps =
-rrequirements.txt
-rtest-requirements.txt
pytest-operator
commands = pytest -v --tb native --show-capture=no {posargs} {toxinidir}/tests/
[testenv:full_bundle_tests]
# requires to specify following arguments:
# --channel <channel_name> or --file <bundle_file>.yaml
# requires to specify following environment variables:
# BUNDLE_TEST_PATH - path to the bundle test directory
#
# final execution command might look like:
# BUNDLE_TEST_PATH=tests-bundle/1.7 tox -e full_bundle_tests -- --channel=1.7/stable
commands =
pytest -vs --tb native -m deploy --model kubeflow --keep-models {env:BUNDLE_TEST_PATH} {posargs}
pytest -vs --tb native -m selenium --model kubeflow {env:BUNDLE_TEST_PATH} {posargs}
passenv =
BUNDLE_TEST_PATH
GH_TOKEN
deps =
-r {env:BUNDLE_TEST_PATH}/requirements.txt
[testenv:test_bundle_1.7]
commands =
pytest -vs --tb native {[vars]releases_test_path}1.7 -m deploy --model kubeflow --channel 1.7/stable {posargs}
deps =
-r {[vars]releases_test_path}/1.7/requirements.txt
description = Test bundles
[testenv:test_selenium_1.7]
commands =
pytest -vs --tb native {[vars]releases_test_path}1.7 -m selenium --model kubeflow --channel 1.7/stable {posargs}
deps =
-r {[vars]releases_test_path}/1.7/requirements.txt
description = Test bundles
[testenv:test_bundle_deployment-{1.7,1.8}]
commands =
pytest -v --tb native --asyncio-mode=auto {[vars]test_path}/integration/test_bundle_deployment.py --keep-models --log-cli-level=INFO -s {posargs}
setenv =
1.7: BUNDLE_PATH = "./releases/1.7/stable/kubeflow/bundle.yaml"
1.8: BUNDLE_PATH = "./releases/1.8/stable/kubeflow/bundle.yaml"
deps =
aiohttp
lightkube
pytest-operator
tenacity
ops>=2.3.0
1.7: juju<3.0.0
1.8: juju<4.0.0
description = Test bundle deployment