1
0
mirror of https://github.com/nvm-sh/nvm.git synced 2026-02-11 11:23:45 +08:00

[Tests] add retry logic

This commit is contained in:
Jordan Harband
2026-01-27 20:59:30 -08:00
parent 973840565e
commit 6d761baef8

View File

@@ -69,7 +69,19 @@ jobs:
- run: npm ls urchin
- run: npx which urchin
- run: env
- run: make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }}
- name: Run tests
shell: bash
run: |
for attempt in 1 2 3; do
timeout 600 make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }} && exit 0
EXIT_CODE=$?
if [ $EXIT_CODE -ne 124 ]; then
exit $EXIT_CODE
fi
echo "Attempt ${attempt} timed out; retrying..."
done
echo "All 3 attempts timed out."
exit 1
nvm:
permissions: