Skip to content

Commit

Permalink
update shell var & add baseline coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
DI-Tony-Reed committed Oct 14, 2024
1 parent ac51932 commit 31f09fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "Coverage: $COVERAGE"
COLOR="red"
COLOR="gray"
if (( $(echo "$COVERAGE < 50" | bc -l) )); then
COLOR="red"
elif (( $(echo "$COVERAGE >= 50 && $COVERAGE < 80" | bc -l) )); then
Expand All @@ -49,10 +49,10 @@ jobs:
COLOR="gray"
fi
BADGE_MARKDOWN="![Coverage](https://img.shields.io/badge/coverage-${COVERAGE}%25-${BADGE_COLOR})"
BADGE_MARKDOWN="![Coverage](https://img.shields.io/badge/coverage-${COVERAGE}%25-${COLOR})"
echo "Updating README.md with the new badge..."
sed -i "s|\\[!\\[Coverage\\](.*\\)|$BADGE_MARKDOWN|g" README.md
sed -i "s|![Coverage](.*)|$BADGE_MARKDOWN|g" README.md
- name: Commit coverage badge
continue-on-error: true
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Tests](https://github.com/DI-Tony-Reed/JSONDiff/actions/workflows/tests.yaml/badge.svg)](https://github.com/DI-Tony-Reed/JSONDiff/actions/workflows/tests.yaml)
![Coverage Badge](https://img.shields.io/badge/Coverage-93.8%25-brightgreen.svg)

# What is this
This tool accepts two JSON Snyk scans and returns the difference between them. It utilizes a slightly modified version of https://github.com/hezro/snyk-code-pr-diff for the comparison.
Expand Down

0 comments on commit 31f09fe

Please sign in to comment.