Skip to content

Commit

Permalink
add coverage echo for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DI-Tony-Reed committed Oct 14, 2024
1 parent 2a24ba6 commit 3aebc9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-tests-coverage.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -12,7 +12,7 @@ on:
jobs:

build:
name: Go tests
name: Go test coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion 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)
[![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.
Expand Down

0 comments on commit 3aebc9e

Please sign in to comment.