From 123a71a98467175e5a5c2a2bba0b92543c20ca3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 16 Feb 2020 18:34:46 +0100 Subject: [PATCH] :wrench: badge and other stuff --- .github/workflows/coverage.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index dd906823..49cd73bb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,16 +37,19 @@ jobs: - name: Install gcovr run: | pip install git+https://github.com/gcovr/gcovr.git -# run: | -# sudo apt-get update -# sudo apt-get install gcovr - name: Generate Report run: | - gcovr -h COV_TXT=$(gcovr -s --html-details cov.html | grep lines | cut -d" " -f2) COV_NUM=${COV_TXT: : -1} - echo $COV_NUM + if [ $COV_NUM -ge 90 ] + then COLOR=green + elif [ $COV_NUM -ge 90 ] + then COLOR=yellow + else COLOR=red + fi + wget https://badgen.net/badge/coverage/$COV_TXT/$COLOR -O badge.svg + echo $COV_NUM $COLOR ls - name: Push Report @@ -55,6 +58,7 @@ jobs: cd gwion-coverage-report rm -f *.html cp ../*.html . + cp ../badge.svg . mv cov.html index.html ls cat index.html -- 2.43.0