This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 9f27c992da .github: skip coverage data when string is empty
9f27c992da is described below

commit 9f27c992dace289224f39fe3e8db57770b8e7648
Author: Rohit Yadav <[email protected]>
AuthorDate: Tue Apr 26 15:06:06 2022 +0530

    .github: skip coverage data when string is empty
    
    This fixes issue of empty rows in the PR coverage data
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 .github/workflows/coverage-check.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/coverage-check.yml 
b/.github/workflows/coverage-check.yml
index 8667583aa0..667d18be7d 100644
--- a/.github/workflows/coverage-check.yml
+++ b/.github/workflows/coverage-check.yml
@@ -97,7 +97,9 @@ jobs:
             name=$(basename $file | sed 's/.java//g')
             coverage=$(grep ,$name, 
client/target/site/jacoco-aggregate/jacoco.csv | cut -f3-9 -d"," | sed 
's/,/|/g')
             echo $coverage
-            echo "|$coverage|" >> $GITHUB_ENV
+            if [[ ! -z "${coverage// }" ]]; then
+              echo "|$coverage|" >> $GITHUB_ENV
+            fi
           done
           echo "EOF" >> $GITHUB_ENV
 

Reply via email to