Skip to content

Commit 900df40

Browse files
committed
ci: enhance GitHub Actions with visual coverage reporting and remove codecov integration
Change-Id: I4091f1c049acfff74f70e137edde912d52456e4a Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent 8e7ed79 commit 900df40

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,53 @@ jobs:
8080
echo "end_of_record"
8181
done
8282
} > lcov.info
83+
84+
# Create markdown coverage summary for GitHub Actions
85+
{
86+
echo "## 📊 Test Coverage Report"
87+
echo ""
88+
89+
# Extract overall coverage percentage
90+
if [ -f "luacov.report.out" ]; then
91+
overall_coverage=$(grep -E "Total.*%" luacov.report.out | grep -oE "[0-9]+\.[0-9]+%" | head -1)
92+
if [ -n "$overall_coverage" ]; then
93+
echo "**Overall Coverage: $overall_coverage**"
94+
echo ""
95+
fi
96+
97+
# Create table header
98+
echo "| File | Coverage |"
99+
echo "|------|----------|"
100+
101+
# Extract file-by-file coverage
102+
grep -E "^[^ ].*:" luacov.report.out | while read -r line; do
103+
file=$(echo "$line" | cut -d':' -f1)
104+
percent=$(echo "$line" | grep -oE "[0-9]+\.[0-9]+%" | head -1)
105+
if [ -n "$percent" ]; then
106+
# Add emoji based on coverage level
107+
percent_num="${percent%.*}"
108+
if [ "$percent_num" -ge 90 ]; then
109+
emoji="🟢"
110+
elif [ "$percent_num" -ge 70 ]; then
111+
emoji="🟡"
112+
else
113+
emoji="🔴"
114+
fi
115+
echo "| \`$file\` | $emoji $percent |"
116+
fi
117+
done
118+
else
119+
echo "❌ No coverage report generated"
120+
fi
121+
} >> "$GITHUB_STEP_SUMMARY"
83122
else
84-
echo "No coverage data found in luacov.stats.out"
85-
touch lcov.info
123+
{
124+
echo "## 📊 Test Coverage Report"
125+
echo ""
126+
echo "❌ No coverage data found - tests may not have run with coverage enabled"
127+
} >> "$GITHUB_STEP_SUMMARY"
86128
fi
87129
88-
- name: Upload coverage report
89-
uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4
90-
with:
91-
files: ./lcov.info
92-
fail_ci_if_error: false
93-
94130
integration-tests:
95131
runs-on: ubuntu-latest
96132
needs: unit-tests

0 commit comments

Comments
 (0)