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

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new e540e46b8 RATIS-2112. Improve repeat-test workflow (#1112)
e540e46b8 is described below

commit e540e46b8b341c8df1687f030cafd5cbe51d4600
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Jun 13 08:26:25 2024 +0200

    RATIS-2112. Improve repeat-test workflow (#1112)
---
 .github/workflows/repeat-test.yml | 6 +++---
 dev-support/checks/unit.sh        | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/repeat-test.yml 
b/.github/workflows/repeat-test.yml
index e3c05bec6..f431b1a0f 100644
--- a/.github/workflows/repeat-test.yml
+++ b/.github/workflows/repeat-test.yml
@@ -114,12 +114,12 @@ jobs:
         if: ${{ !cancelled() }}
       - name: Archive build results
         uses: actions/upload-artifact@v4
-        if: always()
+        if: ${{ failure() }}
         with:
-          name: result-${{ env.TEST_CLASS }}-split-${{ matrix.split }}
+          name: result-${{ github.run_number }}-${{ github.run_id }}-split-${{ 
matrix.split }}
           path: target/unit
   count-failures:
-    if: ${{ always() }}
+    if: ${{ failure() }}
     needs: test
     runs-on: ubuntu-20.04
     steps:
diff --git a/dev-support/checks/unit.sh b/dev-support/checks/unit.sh
index f7a4f3017..389c5c527 100755
--- a/dev-support/checks/unit.sh
+++ b/dev-support/checks/unit.sh
@@ -65,6 +65,12 @@ for i in $(seq 1 ${ITERATIONS}); do
   fi
 
   if [[ ${ITERATIONS} -gt 1 ]]; then
+    if ! grep -q "Running .*Test" "${REPORT_DIR}/output.log"; then
+      echo "No tests were run" >> "${REPORT_DIR}/summary.txt"
+      irc=1
+      FAIL_FAST=true
+    fi
+
     if [[ ${irc} == 0 ]]; then
       rm -fr "${REPORT_DIR}"
     fi

Reply via email to