-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
52 lines (47 loc) · 1.9 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
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = {kfp-api,kfp-metadata-writer,kfp-persistence,kfp-profile-controller,kfp-schedwf,kfp-ui,kfp-viewer,kfp-viz}-{lint,unit,integration},bundle-integration-{v1, v2}
[vars]
tst_path = {toxinidir}/tests/
[testenv]
allowlist_externals = tox
setenv =
api: CHARM = api
metadata-writer: CHARM = metadata-writer
persistence: CHARM = persistence
profile-controller: CHARM = profile-controller
schedwf: CHARM = schedwf
ui: CHARM = ui
viewer: CHARM = viewer
viz: CHARM = viz
fmt: TYPE = fmt
lint: TYPE = lint
unit: TYPE = unit
integration: TYPE = integration
commands =
tox -c charms/kfp-{env:CHARM} -e {env:TYPE} -- {posargs}
[testenv:update-requirements]
allowlist_externals =
bash
find
pip-compile
xargs
commands =
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
[testenv:bundle-integration-v1]
commands = pytest -vv --tb=native -s {posargs} {[vars]tst_path}integration/test_kfp_functional_v1.py
deps =
-r requirements-integration-v1.txt
[testenv:bundle-integration-v2]
commands = pytest -vv --tb=native -s {posargs} {[vars]tst_path}integration/test_kfp_functional_v2.py
deps =
-r requirements-integration-v2.txt