Skip to content

Commit

Permalink
Update testing.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeevkse authored Aug 2, 2024
1 parent 834e1dc commit 0bb0a5f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ jobs:
run: npm run test -- --coverage

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: npx coveralls < ./coverage/lcov.info

- name: Create coverage badge
run: |
COVERAGE=$(npx coveralls < ./coverage/lcov.info | grep -o 'https://img.shields.io/badge/coverage-[^"]*')
COVERAGE=$(curl -s https://coveralls.io/repos/github/${{ github.repository }}/badge.svg?branch=main)
echo "![Coverage Badge]($COVERAGE)" > coverage-badge.md
cat coverage-badge.md
cp coverage-badge.md ./coverage-badge.md
Expand Down

0 comments on commit 0bb0a5f

Please sign in to comment.