This is an automated email from the ASF dual-hosted git repository.
wangwei pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git
The following commit(s) were added to refs/heads/dev by this push:
new 3504443 conda build and test with Github Actions
new 24a7d1d Merge pull request #781 from moazreyad/dev
3504443 is described below
commit 3504443de6fb8ff3270733c04a9a94d4537d1a87
Author: Moaz Reyad <[email protected]>
AuthorDate: Mon Aug 17 15:59:08 2020 +0200
conda build and test with Github Actions
---
.github/workflows/conda.yaml | 40 ++++++++++++++++++++++++++++++++++++++++
test/python/run.py | 16 ++++++++++------
2 files changed, 50 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/conda.yaml b/.github/workflows/conda.yaml
new file mode 100644
index 0000000..f82f30e
--- /dev/null
+++ b/.github/workflows/conda.yaml
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+# This is a basic workflow to help you get started with Actions
+
+name: conda
+
+# Controls when the action will run. Triggers the workflow on push or pull
request
+# events but only for the master branch
+on:
+ push:
+ pull_request:
+
+# A workflow run is made up of one or more jobs that can run sequentially or
in parallel
+jobs:
+ build-ubuntu-conda:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: install-conda-build
+ run: conda install conda-build
+ - name: conda-config
+ run: conda config --add channels conda-forge && conda config --add
channels nusdbsystem
+ - name: build-singa-conda
+ run: conda build tool/conda/singa
diff --git a/test/python/run.py b/test/python/run.py
index b6e318f..b787a15 100644
--- a/test/python/run.py
+++ b/test/python/run.py
@@ -16,11 +16,15 @@
# limitations under the License.
#
+import sys
import unittest
-# import xmlrunner
-loader = unittest.TestLoader()
-tests = loader.discover('.')
-testRunner = unittest.runner.TextTestRunner()
-# testRunner = xmlrunner.XMLTestRunner(output='.')
-testRunner.run(tests)
+def main():
+ loader = unittest.TestLoader()
+ tests = loader.discover('.')
+ testRunner = unittest.runner.TextTestRunner()
+ ret = not testRunner.run(tests).wasSuccessful()
+ sys.exit(ret)
+
+if __name__ == "__main__":
+ main()