Skip to content

Commit 9028a18

Browse files
committed
CI: dump test results on failure for diagnostics
https://claude.ai/code/session_015LpmjAt17XD582hZ9TPLCv
1 parent dc47f47 commit 9028a18

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ jobs:
4545
- name: Run tests
4646
run: ./gradlew test --stacktrace
4747

48+
- name: Print test results on failure
49+
if: failure()
50+
run: |
51+
echo "=== TEST RESULTS XML ==="
52+
find build/test-results -name '*.xml' -exec cat {} \; 2>/dev/null || echo "No XML results found"
53+
echo "=== STDOUT/STDERR ==="
54+
find build/test-results -name '*.txt' -exec cat {} \; 2>/dev/null || echo "No text output found"
55+
echo "=== GRADLE TEST REPORT ==="
56+
find build/reports/tests -name '*.html' -exec grep -l 'failures' {} \; 2>/dev/null || echo "No HTML reports found"
57+
for f in $(find build/reports/tests -name '*.html' 2>/dev/null); do
58+
echo "--- $f ---"
59+
cat "$f" | sed 's/<[^>]*>//g' | head -100
60+
done
61+
4862
- name: Upload test results
4963
if: always()
5064
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)