diff --git a/.github/workflows/update-tests-coverage.yml b/.github/workflows/update-tests-coverage.yml index 777fdf6..afd01c2 100644 --- a/.github/workflows/update-tests-coverage.yml +++ b/.github/workflows/update-tests-coverage.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 70b4cb8..7716b91 100644 --- a/README.md +++ b/README.md @@ -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.