You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ji...@apache.org on 2021/04/22 18:38:06 UTC
[helix] branch master updated: Print test result with annotations.
This is an automated email from the ASF dual-hosted git repository.
jiajunwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 2215ef9 Print test result with annotations.
2215ef9 is described below
commit 2215ef9071e31c524f2605689f527a8acfcfbe09
Author: Jiajun Wang <jj...@linkedin.com>
AuthorDate: Wed Apr 21 21:47:43 2021 -0700
Print test result with annotations.
---
.github/scripts/printTestResult.sh | 32 ++++++++++++++++++++++++++++++++
.github/workflows/Helix-CI.yml | 2 ++
2 files changed, 34 insertions(+)
diff --git a/.github/scripts/printTestResult.sh b/.github/scripts/printTestResult.sh
new file mode 100755
index 0000000..789ac97
--- /dev/null
+++ b/.github/scripts/printTestResult.sh
@@ -0,0 +1,32 @@
+#!/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.
+#
+
+for testResultPath in $(find . -name 'TestSuite.txt')
+do
+ while read line
+ do
+ if [[ $line == 'Tests run:'* ]]; then
+ printf "[info] $testResultPath: $line\n"
+ elif [[ $line == *'<<< FAILURE!' ]]; then
+ printf "##[error] Test failed: $line\n"
+ fi
+ done < $testResultPath
+done
diff --git a/.github/workflows/Helix-CI.yml b/.github/workflows/Helix-CI.yml
index dbc4af3..28d50f4 100644
--- a/.github/workflows/Helix-CI.yml
+++ b/.github/workflows/Helix-CI.yml
@@ -20,6 +20,8 @@ jobs:
run: mvn clean install -Dmaven.test.skip.exec=true
- name: Run All Tests
run: mvn -q -fae test
+ - name: Print Tests Results
+ run: .github/scripts/printTestResult.sh
- name: Upload to Codecov
if: ${{ github.event_name == 'push' }}
run: bash <(curl -s https://codecov.io/bash)