File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,6 +136,19 @@ jobs:
136136 mkdir -p coverage-baseline
137137 echo "$CURRENT_COVERAGE" > coverage-baseline/main-coverage.txt
138138
139+ # Generate coverage badge
140+ COVERAGE_INT=$(echo "$CURRENT_COVERAGE" | cut -d. -f1)
141+ if [ "$COVERAGE_INT" -ge 80 ]; then
142+ COLOR="brightgreen"
143+ elif [ "$COVERAGE_INT" -ge 60 ]; then
144+ COLOR="yellow"
145+ else
146+ COLOR="red"
147+ fi
148+
149+ # Create badge SVG using shields.io format
150+ curl -s "https://img.shields.io/badge/coverage-${CURRENT_COVERAGE}%25-${COLOR}" > site/coverage/badge.svg
151+
139152 - name : Upload baseline coverage
140153 if : github.ref == 'refs/heads/main' && github.event_name == 'push'
141154 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 11# OO7
22
3- [ ![ docs] ( https://docs.rs/oo7/badge.svg )] ( https://docs.rs/oo7/ ) [ ![ crates.io] ( https://img.shields.io/crates/v/oo7 )] ( https://crates.io/crates/oo7 ) ![ CI] ( https://github.com/bilelmoussaoui/oo7/workflows/CI/badge.svg )
3+ [ ![ docs] ( https://docs.rs/oo7/badge.svg )] ( https://docs.rs/oo7/ ) [ ![ crates.io] ( https://img.shields.io/crates/v/oo7 )] ( https://crates.io/crates/oo7 ) ![ CI] ( https://github.com/bilelmoussaoui/oo7/workflows/CI/badge.svg ) [ ![ Coverage ] ( https://bilelmoussaoui.github.io/oo7/coverage/badge.svg )] ( https://bilelmoussaoui.github.io/oo7/coverage/ )
44
55James Bond went on a new mission and this time as a [ Secret Service provider] ( https://specifications.freedesktop.org/secret-service-spec/latest/ ) .
66
You can’t perform that action at this time.
0 commit comments