Skip to content

Commit

Permalink
add workflow for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
micha37-martins committed Aug 22, 2024
1 parent 22825c0 commit 9d0faec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/github-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
chmod +x ./coverage.sh
bash ./coverage.sh
- name: Extract coverage percentage
- name: Extract coverage percentage from index.js
id: coverage
shell: bash
run: |
grep -o 'Overall coverage rate.*' coverage/index.html | grep -o '[0-9]*\.[0-9]*' > coverage.txt
coverage=$(cat coverage.txt)
coverage=$(jq -r '.files[0].covered' ./coverage/test_smartmon.coverage/index.js)
echo "Extracted coverage percentage: $coverage"
echo "::set-output name=coverage::$coverage"
- name: Update README.md with coverage badge
Expand Down

0 comments on commit 9d0faec

Please sign in to comment.