From 91b34c04d811e349811f3b234c594092616f3257 Mon Sep 17 00:00:00 2001 From: Malik Parvez <84777619+malikparvez@users.noreply.github.com> Date: Tue, 8 Aug 2023 14:03:43 +0530 Subject: [PATCH] Adding retry for acceptance if fails --- .github/workflows/nightly.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index da63b3ab..9d718e3c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -112,7 +112,16 @@ jobs: - name: Run acceptance tests run: | - bundle exec rake 'litmus:acceptance:parallel' + for i in 1 2 3; do + if bundle exec rake 'litmus:acceptance:parallel'; then + break + elif [ "$i" -lt 3 ]; then + echo "Retrying acceptance tests (Attempt $i)" + else + echo "Acceptance tests failed after $i attempts." + exit 1 + fi + done - name: Remove test environment if: ${{ always() }}