Adding tox.ini to check coverage 03/10003/1
authorminhac.lee <minhac.lee@samsung.com>
Thu, 8 Dec 2022 01:14:41 +0000 (10:14 +0900)
committerminhac.lee <minhac.lee@samsung.com>
Thu, 8 Dec 2022 01:15:32 +0000 (10:15 +0900)
Issue-Id: AIMLFW-5

Signed-off-by: minhac.lee <minhac.lee@samsung.com>
Change-Id: I39218acfbab179b51284cd2a44e4fb19638383c9

tox.ini [new file with mode: 0644]

diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..3882fb8
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,46 @@
+# ==================================================================================
+#
+#       Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+# ==================================================================================
+
+[tox]
+envlist = code
+skipsdist = true
+
+# basic test and coverage job
+[testenv:code]
+basepython = python3.8
+deps=
+  pytest
+  coverage
+  pytest-cov
+  unittest
+  mock
+  kfp
+  kfp-pipeline-spec
+  kfp-server-api
+  Flask
+  Flask-API
+  Flask-Cors
+  requests
+  Werkzeug
+  
+setenv = cd = {toxinidir}/test
+commands = 
+  pip3 install {toxinindir}
+
+  pytest --cov {toxinidir}/kfadapter --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=10 --junitxaml=/tmp/tests.xml
+  coverage xml -i
\ No newline at end of file