ci: retry only in stable or release

This commit is contained in:
shum
2025-04-21 14:17:42 +00:00
committed by Evgeny Poberezkin
parent afb338a41a
commit aa9b93eee5

View File

@@ -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