Skip to content

Commit

Permalink
test test coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiKhomik committed Nov 21, 2024
1 parent a40b6c1 commit b939641
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,25 @@ jobs:
run: |
bundle exec rspec ./spec -f j -o tmp/rspec_results.json -f p
- name: Set up Coverage Environment Variable
run: |
export COVERAGE=$(cat tmp/rspec_results.json | jq '.coverage')
echo "COVERAGE=$COVERAGE" >> $GITHUB_ENV
- name: RSpec Report
uses: SonicGarden/rspec-report-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
json-path: tmp/rspec_results.json
if: always()

- name: Create the Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: e79c3ef008afb7fb7474dc1c582416ac
filename: tmp/rspec_results.json
label: Test Coverage
message: ${{ env.COVERAGE }}
color: green
namedLogo: ruby

0 comments on commit b939641

Please sign in to comment.