From e7e0c7931fa6774d9adcd59ec018ec7cf5428d9c Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" <6454655+adoroszlai@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:26:25 +0200 Subject: [PATCH] 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 e3c05bec6a..f431b1a0fe 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 f7a4f3017e..389c5c5275 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