From: Jérémie Astor Date: Sun, 16 Feb 2020 20:03:59 +0000 (+0100) Subject: :wrench: Update X-Git-Tag: nightly~1906 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=bef23a2fdc975d5b467a9a27b58551811b2a1181;p=gwion.git :wrench: Update --- diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bee051da..57e6dd9c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -38,30 +38,29 @@ jobs: run: | pip install git+https://github.com/gcovr/gcovr.git + - name: Clone report repo + run: | + git clone https://github.com/fennecdjay/gwion-coverage-report + rm -f gwion-coverage-report/*.html + - name: Generate Report run: | - COV_TXT=$(gcovr -s --html-details cov.html --filter '.*\.c$' src | grep lines | cut -d" " -f2) + COV_TXT=$(gcovr -s --html-details gwion-coverage-report/index.html --filter '.*\.c$' src | grep lines | cut -d" " -f2) COV_NUM=${COV_TXT: : -1} - COV_INT=${COV_NUM: : -2} - if [ $COV_INT -ge 90 ] + echo $COV_NUM > gwion-coverage-report/coverage_num.txt + if [ $(python -c "print( $COV_NUM >= 90 )") = True ] then COLOR=green - elif [ $COV_INT -ge 75 ] + elif [ $(python -c "print( $COV_NUM >= 75 )") = True ] then COLOR=yellow else COLOR=red fi while true - do wget https://badgen.net/badge/coverage/$COV_NUM/$COLOR -O badge.svg && break + do wget https://badgen.net/badge/coverage/$COV_NUM/$COLOR -O gwion-coverage-report/badge.svg && break done - name: Push Report run: | - git clone https://github.com/fennecdjay/gwion-coverage-report cd gwion-coverage-report - rm -f *.html *.svg - cp ../*.html . - convert -size 1024x1024 ../badge.svg badge.png - cp ../badge.svg badge.svg - mv cov.html index.html git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add .