Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@ jobs:
run: ${{ inputs.script }}
timeout-minutes: 60

- name: Summarize flaky tests
if: ${{ hashFiles('**/TEST-*.xml') != '' }}
shell: bash
run: |
# Count flaky failures recursively
flaky_count=$(grep -R "<flakyFailure" . | wc -l)

echo "### Flaky Tests: $flaky_count found"

if [ "$flaky_count" -gt 0 ]; then
echo "#### Flaky Test Details"
grep -R "<flakyFailure" . | sed -E 's#.*/TEST-(.*)\.xml.*message="([^"]*)".*#- \1: \2#'
fi

- name: Normalize flaky failures
if: ${{ hashFiles('**/TEST-*.xml') != '' }}
run: |
find . -name "TEST-*.xml" -exec sed -i 's/flakyFailure/failure/g' {} +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Flaky errors are still ignored by CI

The normalization only rewrites flakyFailure elements, but Maven Surefire also emits flakyError for tests that error on an earlier attempt and pass on rerun. Those XML entries will remain flaky-only, so mikepenz/action-junit-report can still treat them as retries/flakes instead of failing the job. This leaves a common class of intermittent test failures hidden. The same handling should include flakyError -> error, and the summary/count should include both tag types.


- name: Publish Test Report
if: ${{ hashFiles('**/TEST-*.xml') != '' }}
uses: mikepenz/action-junit-report@v5
Expand Down
Loading