From fee5ab185f89aa0c5e0056b981a324ebfce8b2cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 20 Feb 2020 18:04:40 +0100 Subject: [PATCH] :wrench: Badge script --- .github/workflows/coverage.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ad83440b..f68bb48e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -48,7 +48,6 @@ jobs: rm -f gwion-coverage-report/*.html - name: Generate Report -# if: github.event_name == 'push' run: | printf '# Gwion coverage\n```\n' > gwion-coverage-report/README.md gcovr -s --filter '.*\.c$' src >> gwion-coverage-report/README.md @@ -56,15 +55,6 @@ jobs: COV_TXT=$(gcovr -s --html-details index.html --html-title "Gwion coverage report" --filter '.*\.c$' src | grep lines | cut -d" " -f2) COV_NUM=${COV_TXT: : -1} echo $COV_NUM > gwion-coverage-report/coverage_num.txt - if [ $(python -c "print( $COV_NUM >= 90 )") = True ] - then COLOR=green - 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 gwion-coverage-report/badge.svg && break - done sed -i 's//