Skip to content

Commit

Permalink
fix(ci): ci steps swap test
Browse files Browse the repository at this point in the history
  • Loading branch information
mahabubx7 committed Oct 14, 2024
1 parent 9955223 commit 02de455
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,27 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Generate coverage badge
run: npx covgen badge

- name: Update README with coverage badge
run: |
COVERAGE_BADGE=$(cat coverage/badge.svg)
sed -i 's|<img src=".*" alt="Coverage Badge"/>|'"$COVERAGE_BADGE"'|' README.md
npx covgen badge
ls -R coverage # Check contents of the coverage folder
- name: Generate test result badge
run: node scripts/generate-badges.cjs

- name: Update README with coverage badge
run: |
if [ -f coverage/badge.svg ]; then
COVERAGE_BADGE=$(cat coverage/badge.svg)
sed -i 's|<img src=".*" alt="Coverage Badge"/>|'"$COVERAGE_BADGE"'|' README.md
else
echo "Coverage badge not found"
fi
- name: Update README with test result badge
run: |
TEST_BADGE=$(cat test-result/badge.svg)
sed -i 's|<img src=".*" alt="Test Result Badge"/>|'"$TEST_BADGE"'|' README.md
if [ -f test-result/badge.svg ]; then
TEST_BADGE=$(cat test-result/badge.svg)
sed -i 's|<img src=".*" alt="Test Result Badge"/>|'"$TEST_BADGE"'|' README.md
else
echo "Test result badge not found"
fi

0 comments on commit 02de455

Please sign in to comment.