This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch add-test-report in repository https://gitbox.apache.org/repos/asf/camel.git
commit 17bab2a542b9089ddee306995eb2a1f038077981 Author: Nicolas Filotto <[email protected]> AuthorDate: Thu Nov 9 11:25:11 2023 +0100 (chore) ci: add failing tests list on error --- .github/actions/component-test/component-test.sh | 7 +++++++ .github/actions/incremental-build/incremental-build.sh | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/actions/component-test/component-test.sh b/.github/actions/component-test/component-test.sh index 58f5d5f1f62..ea7e17d40e0 100755 --- a/.github/actions/component-test/component-test.sh +++ b/.github/actions/component-test/component-test.sh @@ -56,6 +56,13 @@ function main() { else echo "Launching tests of the projects ${pl}" $mavenBinary -l $log $MVND_OPTS install -pl "$pl" + ret=$? + + if [[ ${ret} -ne 0 ]] ; then + echo "Processing surefire and failsafe reports to create the summary" + echo -e "| Failed Test | Duration | Failure Type |\n| --- | --- | --- |" > "$GITHUB_STEP_SUMMARY" + find . -path '*target/*-reports*' -iname '*.txt' -exec .github/actions/incremental-build/parse_errors.sh {} \; + fi fi } diff --git a/.github/actions/incremental-build/incremental-build.sh b/.github/actions/incremental-build/incremental-build.sh index b5e29a444fd..9cbbf1fcc9a 100755 --- a/.github/actions/incremental-build/incremental-build.sh +++ b/.github/actions/incremental-build/incremental-build.sh @@ -144,9 +144,11 @@ function main() { fi fi - echo "Processing surefire and failsafe reports to create the summary" - echo -e "| Failed Test | Duration | Failure Type |\n| --- | --- | --- |" > "$GITHUB_STEP_SUMMARY" - find . -path '*target/*-reports*' -iname '*.txt' -exec .github/actions/incremental-build/parse_errors.sh {} \; + if [[ ${ret} -ne 0 ]] ; then + echo "Processing surefire and failsafe reports to create the summary" + echo -e "| Failed Test | Duration | Failure Type |\n| --- | --- | --- |" > "$GITHUB_STEP_SUMMARY" + find . -path '*target/*-reports*' -iname '*.txt' -exec .github/actions/incremental-build/parse_errors.sh {} \; + fi exit $ret }
