Skip to content

Commit

Permalink
Put total coverage percentage in the badge
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mysh committed Apr 19, 2024
1 parent 0563a4e commit bc9b278
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/TestCoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ 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:
auth: ${{ secrets.TEST_COVERAGE_GIST }}
gistID: 8ec74eae558f3a7793622f6469064b73
filename: test_coverage_badge.json
label: Test coverage
message: TBD
color: orange
message: ${{ env.PCOV }}
valColorRange: ${{ env.PCOV }}
maxColorRange: 100
minColorRange: 0

0 comments on commit bc9b278

Please sign in to comment.