diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69f568a78..58ed41137 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -247,12 +247,15 @@ jobs: - name: Test if: matrix.should_run == true + timeout-minutes: 120 shell: bash env: PGHOST: localhost run: | i=1 - while [ "$i" -le 10 ]; do + attempts=1 + ${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) }} && attempts=3 + while [ "$i" -le "$attempts" ]; do if ./simplexmq-test; then break else @@ -261,7 +264,7 @@ jobs: sleep 1 fi done - if [ "$i" -gt 10 ]; then - echo "All 10 attempts failed." + if [ "$i" -gt "$attempts" ]; then + echo "All "$attempts" attempts failed." exit 1 fi