Skip to content

Commit

Permalink
fix(ci): ci fix trail
Browse files Browse the repository at this point in the history
  • Loading branch information
mahabubx7 committed Oct 14, 2024
1 parent 02de455 commit b53b7de
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ jobs:
echo "Coverage badge not found"
fi
- name: Update README with test result badge
- name: Update README with coverage badge
run: |
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
if [ -f coverage/badge.svg ]; then
# Replace the badge placeholder in README.md with actual badge content
COVERAGE_BADGE=$(cat coverage/badge.svg)
# Use '#' as delimiter and insert the badge safely into README.md
sed -i 's#<img src=".*" alt="Coverage Badge"/>#'"$COVERAGE_BADGE"'#' README.md
else
echo "Test result badge not found"
echo "Coverage badge not found"
fi

0 comments on commit b53b7de

Please sign in to comment.