Skip to content

Commit aa9b93e

Browse files
shumvgoloveepoberezkin
authored andcommitted
ci: retry only in stable or release
1 parent afb338a commit aa9b93e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,15 @@ jobs:
247247

248248
- name: Test
249249
if: matrix.should_run == true
250+
timeout-minutes: 120
250251
shell: bash
251252
env:
252253
PGHOST: localhost
253254
run: |
254255
i=1
255-
while [ "$i" -le 10 ]; do
256+
attempts=1
257+
${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) }} && attempts=3
258+
while [ "$i" -le "$attempts" ]; do
256259
if ./simplexmq-test; then
257260
break
258261
else
@@ -261,7 +264,7 @@ jobs:
261264
sleep 1
262265
fi
263266
done
264-
if [ "$i" -gt 10 ]; then
265-
echo "All 10 attempts failed."
267+
if [ "$i" -gt "$attempts" ]; then
268+
echo "All "$attempts" attempts failed."
266269
exit 1
267270
fi

0 commit comments

Comments
 (0)