-
Notifications
You must be signed in to change notification settings - Fork 50
/
tox.ini
101 lines (88 loc) · 2.98 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
100
101
[tox]
skipsdist = True
envlist = lint, fmt, tests, full_bundle_tests, test_bundle_1.7, test_selenium_1.7, {test_bundle_deployment}-{1.7,1.8,1.9,latest}
[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}
; Disabled temporarily until Selenium tests are fixed in CI and
; https://github.com/canonical/bundle-kubeflow/issues/671 is closed
; 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,1.9,latest}]
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"
1.9: BUNDLE_PATH = "./releases/1.9/stable/bundle.yaml"
latest: BUNDLE_PATH = "./releases/latest/edge/bundle.yaml"
deps =
aiohttp
lightkube
pytest-operator
tenacity
ops>=2.3.0
1.7: juju<3.0.0
1.8: juju<4.0.0
1.9: juju<4.0.0
latest: juju<4.0.0
description = Test bundle deployment