You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/07/20 13:49:34 UTC

[camel] branch main updated: (chores) ci: added support for generating summaries from the incremental test script

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 9a8eb25d571 (chores) ci: added support for generating summaries from the incremental test script
9a8eb25d571 is described below

commit 9a8eb25d571a1c203cabb685e630093a7b33ba42
Author: Nikita Konovalov <nk...@redhat.com>
AuthorDate: Thu Jul 20 13:15:47 2023 +0200

    (chores) ci: added support for generating summaries from the incremental test script
---
 .../actions/incremental-build/incremental-build.sh |  2 ++
 .github/actions/incremental-build/parse_errors.sh  | 27 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/.github/actions/incremental-build/incremental-build.sh b/.github/actions/incremental-build/incremental-build.sh
index 74bbef45e35..0b301261a60 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -131,6 +131,8 @@ function main() {
       fi
     fi
   fi
+
+  ./parse_errors.sh $log
 }
 
 main "$@"
diff --git a/.github/actions/incremental-build/parse_errors.sh b/.github/actions/incremental-build/parse_errors.sh
new file mode 100644
index 00000000000..7bffef04eef
--- /dev/null
+++ b/.github/actions/incremental-build/parse_errors.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOG_FILE=$1
+
+temp=$(cat $log | grep "ERROR\].org" | grep "Time elapsed" | awk -F ' '  ' {print $3}' | sed 's/^/| /' | sed 's/$/ |/')
+
+if [[ ! -z "$temp" ]] ; then
+  echo -e "| Failed Test |\n| --- |" > "$GITHUB_STEP_SUMMARY"
+  echo "$temp"  >> "$GITHUB_STEP_SUMMARY"
+fi
+