From 0cf0e91060f18fc0745b9d72e94e9afe05f3bf43 Mon Sep 17 00:00:00 2001 From: WilsonLe Date: Mon, 16 Dec 2024 11:32:49 -0500 Subject: [PATCH] add retry workflow --- .github/workflows/test-google-oauth.yml | 13 ++++++++++++- .github/workflows/test-zitadel-oauth.yml | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-google-oauth.yml b/.github/workflows/test-google-oauth.yml index 5f967a4..727288c 100644 --- a/.github/workflows/test-google-oauth.yml +++ b/.github/workflows/test-google-oauth.yml @@ -51,4 +51,15 @@ jobs: - run: | pnpx puppeteer browsers install chrome - run: pnpm install - - run: pnpm test:google + - name: Run test + run: | + for i in {1..3}; do + echo "Attempt $i" + if pnpm test:google; then + echo "Success on attempt $i" + exit 0 + fi + echo "Attempt $i failed, retrying..." + done + echo "All attempts failed" + exit 1 diff --git a/.github/workflows/test-zitadel-oauth.yml b/.github/workflows/test-zitadel-oauth.yml index 6b0bb1e..d0943e0 100644 --- a/.github/workflows/test-zitadel-oauth.yml +++ b/.github/workflows/test-zitadel-oauth.yml @@ -98,4 +98,15 @@ jobs: - run: | pnpx puppeteer browsers install chrome - run: pnpm install - - run: pnpm test:zitadel + - name: Run test + run: | + for i in {1..3}; do + echo "Attempt $i" + if pnpm test:zitadel; then + echo "Success on attempt $i" + exit 0 + fi + echo "Attempt $i failed, retrying..." + done + echo "All attempts failed" + exit 1