diff --git a/.github/workflows/update-tests-coverage.yml b/.github/workflows/update-tests-coverage.yml index b64ca9e..ba762b6 100644 --- a/.github/workflows/update-tests-coverage.yml +++ b/.github/workflows/update-tests-coverage.yml @@ -1,6 +1,6 @@ # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go -name: Tests +name: Update Tests Coverage on: push: @@ -12,7 +12,7 @@ on: jobs: build: - name: Go tests + name: Go test coverage runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -42,6 +42,7 @@ jobs: id: badge run: | COVERAGE=$(echo ${{ env.coverage }}) + echo $COVERAGE COLOR="red" if [ $(echo "$COVERAGE > 80" | bc) -eq 1 ]; then COLOR="green"; fi if [ $(echo "$COVERAGE > 50" | bc) -eq 1 ]; then COLOR="yellow"; fi diff --git a/README.md b/README.md index 70b4cb8..a70c67b 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) +[![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) +![Test Coverage](coverage-badge.md) # 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.