From bc9b2782d129c19d222f36b32007dcce242ce407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominika=20D=C5=82ugosz?= Date: Fri, 19 Apr 2024 18:29:43 +0200 Subject: [PATCH] Put total coverage percentage in the badge --- .github/workflows/TestCoverage.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/TestCoverage.yml b/.github/workflows/TestCoverage.yml index 1eaaf2e..c0592c5 100644 --- a/.github/workflows/TestCoverage.yml +++ b/.github/workflows/TestCoverage.yml @@ -28,7 +28,7 @@ jobs: C:\Miniconda\condabin\conda.bat activate base C:\Miniconda\condabin\conda.bat list coverage run -m pytest - coverage xml -o coverage.xml + echo "PCOV=$(coverage report --format total)" >> $GITHUB_ENV - name: Create Awesome Badge uses: schneegans/dynamic-badges-action@v1.7.0 with: @@ -36,5 +36,7 @@ jobs: gistID: 8ec74eae558f3a7793622f6469064b73 filename: test_coverage_badge.json label: Test coverage - message: TBD - color: orange + message: ${{ env.PCOV }} + valColorRange: ${{ env.PCOV }} + maxColorRange: 100 + minColorRange: 0