ci: Print failed tests to Action Summary (#30853)

This should show the failed test list in the GitHub actions summary so
we don't have to load the _extremely large_ full log file of the server
tests, just to see the list of tests that failed.
This commit is contained in:
Shrikant Sharat Kandula 2024-02-02 10:32:40 +05:30 committed by GitHub
parent 67c444e2a5
commit 11c55b7aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,7 +181,16 @@ jobs:
args+=("-DfailIfNoTests=false" "-Dtest=${failed_tests}") args+=("-DfailIfNoTests=false" "-Dtest=${failed_tests}")
fi fi
args+=("-DtestResultFile=$PWD/failed-server-tests.txt") args+=("-DtestResultFile=$PWD/failed-server-tests.txt")
mvn test "${args[@]}" if ! mvn test "${args[@]}"; then
if [[ -s failed-server-tests.txt ]]; then
{
echo "## Failed tests"
echo
sed 's/^/- /' 'failed-server-tests.txt'
} >> "$GITHUB_STEP_SUMMARY"
fi
exit 1
fi
# Set status = failedtest # Set status = failedtest
- name: Set fail if there are test failures - name: Set fail if there are test failures