Skip to content

Commit

Permalink
Generating firmware coverage badge data, added badges to README
Browse files Browse the repository at this point in the history
  • Loading branch information
amendelzon committed Dec 12, 2023
1 parent 1b5476a commit d439f18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ jobs:
--no-progress --follow-symlinks --delete --only-show-errors
- name: Run firmware coverage script
run: ledger/coverage/gen-coverage
run: |
ledger/coverage/gen-coverage
COVPCT=$(cat ledger/coverage/output/total)
COVCOL=$(utils/coverage-color.sh $COVPCT)
echo "{ \"schemaVersion\": 1, \"label\": \"Firmware coverage\", \"message\": \"$COVPCT%\", \"color\": \"$COVCOL\" }" > ledger/coverage/output/badge.json
- name: "Upload firmware coverage report"
run: |
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
![Tests](https://github.com/rsksmart/rsk-powhsm/actions/workflows/run-tests.yml/badge.svg)
![Python linter](https://github.com/rsksmart/rsk-powhsm/actions/workflows/lint-python.yml/badge.svg)
![C linter](https://github.com/rsksmart/rsk-powhsm/actions/workflows/lint-c.yml/badge.svg)
![Middleware coverage](https://img.shields.io/endpoint?url=https://d16sboe9lzo4ru.cloudfront.net/middleware_coverage_report/badge.json)
![Firmware coverage](https://img.shields.io/endpoint?url=https://d16sboe9lzo4ru.cloudfront.net/firmware_coverage_report/badge.json)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

Expand Down

0 comments on commit d439f18

Please sign in to comment.