Skip to content

Commit ff943fc

Browse files
feat: add clean test results summary for Kotlin SDK
- Remove verbose --info flag from gradle command - Parse HTML test reports to show clean summary per module - Display total test count (209 tests) and pass/fail status - Fail CI if any tests fail 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a01315a commit ff943fc

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,38 @@ jobs:
111111

112112
- name: Run JVM tests
113113
working-directory: sdks/community/kotlin/library
114-
run: ./gradlew jvmTest --no-daemon --stacktrace --info
114+
run: ./gradlew jvmTest --no-daemon --stacktrace
115+
116+
- name: Parse test results
117+
if: always()
118+
working-directory: sdks/community/kotlin/library
119+
run: |
120+
echo "## Kotlin SDK Test Results Summary"
121+
total_tests=0
122+
total_failures=0
123+
total_errors=0
124+
125+
for module in kotlin-core kotlin-client kotlin-tools; do
126+
html_file="$module/build/reports/tests/jvmTest/index.html"
127+
if [ -f "$html_file" ]; then
128+
# Extract test counts from HTML using grep and sed
129+
tests=$(grep -o '[0-9]* tests' "$html_file" | head -1 | sed 's/ tests//')
130+
failures=$(grep -o '[0-9]* failures' "$html_file" | head -1 | sed 's/ failures//' || echo "0")
131+
errors=$(grep -o '[0-9]* errors' "$html_file" | head -1 | sed 's/ errors//' || echo "0")
132+
133+
if [ -n "$tests" ]; then
134+
echo "✅ $module: $tests tests, $failures failures, $errors errors"
135+
total_tests=$((total_tests + tests))
136+
total_failures=$((total_failures + failures))
137+
total_errors=$((total_errors + errors))
138+
fi
139+
fi
140+
done
141+
142+
echo "## Overall Results: $total_tests tests, $total_failures failures, $total_errors errors"
143+
if [ $total_failures -gt 0 ] || [ $total_errors -gt 0 ]; then
144+
echo "❌ Some tests failed"
145+
exit 1
146+
else
147+
echo "✅ All tests passed!"
148+
fi

0 commit comments

Comments
 (0)