Skip to content

Commit

Permalink
Try extract coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dickwolff committed Feb 10, 2024
1 parent fb27cbf commit 57838ee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/frameworkTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,23 @@ jobs:
hide_complexity: true
badge: true
output: 'file'

#https://img.shields.io/badge/Code%20Coverage-80%25-success?style=flat
- name: Extract code coverage badge
run: |
read -r line < code-coverage-results.txt
covBadge=${line/flat/for-the-badge}
echo $covBadge
echo "$covBadge" > cov.txt
coverage=$(echo "$line" | sed -n 's/.*Code%20Coverage-\([0-9]*\)%.*/\1/p')
cat <<EOF > cov.json
{
label: Code Coverage
value: $coverage
style: for-the-badge
}
- name: Publish code coverage badge
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.GIST_SECRET }}
gist_id: dd5dc24ffa62de59b3d836f856f48a10
file_path: cov.txt
file_path: cov.json

0 comments on commit 57838ee

Please sign in to comment.