You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2020/09/07 06:22:08 UTC

[singa] branch dev updated: codecov for python

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 18c2af6  codecov for python
     new 3e83809  Merge pull request #788 from moazreyad/dev
18c2af6 is described below

commit 18c2af64cb5011cc18749f0552e8fad4368355e2
Author: Moaz Reyad <mo...@gmail.com>
AuthorDate: Tue Sep 1 23:28:25 2020 +0200

    codecov for python
---
 .github/workflows/conda.yaml => .codecov.yml | 25 ++-----------------------
 .github/workflows/conda.yaml                 |  2 ++
 .github/workflows/ubuntu.yaml                |  2 ++
 tool/conda/singa/meta.yaml                   | 10 ++++++----
 4 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/.github/workflows/conda.yaml b/.codecov.yml
similarity index 53%
copy from .github/workflows/conda.yaml
copy to .codecov.yml
index d7ecefb..497c927 100644
--- a/.github/workflows/conda.yaml
+++ b/.codecov.yml
@@ -15,26 +15,5 @@
 # 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-pytest-on-cpu:
-    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-pytest
-        run: conda build tool/conda/singa
+ignore:
+  - proto/*
diff --git a/.github/workflows/conda.yaml b/.github/workflows/conda.yaml
index d7ecefb..da579df 100644
--- a/.github/workflows/conda.yaml
+++ b/.github/workflows/conda.yaml
@@ -38,3 +38,5 @@ jobs:
         run: conda config --add channels conda-forge && conda config --add channels nusdbsystem
       - name: build-pytest
         run: conda build tool/conda/singa
+        env:
+          TEST_COMMAND: pytest --cov=$PREFIX/lib/python3.7/site-packages/singa --cov-report=xml && codecov --flags singa-python
diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml
index 936fc5c..b67fcda 100644
--- a/.github/workflows/ubuntu.yaml
+++ b/.github/workflows/ubuntu.yaml
@@ -60,3 +60,5 @@ jobs:
         run: build/bin/test_singa
       - name: Upload coverage to Codecov
         uses: codecov/codecov-action@v1
+        with:
+          flags: singa-cpp
diff --git a/tool/conda/singa/meta.yaml b/tool/conda/singa/meta.yaml
index ec81aed..cface0d 100644
--- a/tool/conda/singa/meta.yaml
+++ b/tool/conda/singa/meta.yaml
@@ -75,14 +75,16 @@ requirements:
     - tqdm
     - onnx 1.6.0
     - deprecated 1.2.7
-    - pytest
-
+    
 test:
+  requires:
+    - pytest-cov
+    - tabulate
+    - codecov
   source_files:
     - test/python/*.py
   commands:
-    - cd test/python && python run.py
-
+    - {{ environ.get('TEST_COMMAND', 'cd test/python && python run.py') }}
 about:
   home: http://singa.apache.org/
   license: Apache V2