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:
parent
67c444e2a5
commit
11c55b7aec
11
.github/workflows/server-build.yml
vendored
11
.github/workflows/server-build.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user