Skip to content

Commit 6d761ba

Browse files
committed
[Tests] add retry logic
1 parent 9738405 commit 6d761ba

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,19 @@ jobs:
6969
- run: npm ls urchin
7070
- run: npx which urchin
7171
- run: env
72-
- run: make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }}
72+
- name: Run tests
73+
shell: bash
74+
run: |
75+
for attempt in 1 2 3; do
76+
timeout 600 make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }} && exit 0
77+
EXIT_CODE=$?
78+
if [ $EXIT_CODE -ne 124 ]; then
79+
exit $EXIT_CODE
80+
fi
81+
echo "Attempt ${attempt} timed out; retrying..."
82+
done
83+
echo "All 3 attempts timed out."
84+
exit 1
7385
7486
nvm:
7587
permissions:

0 commit comments

Comments
 (0)