mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-04-11 14:11:41 +08:00
[Tests] add retry logic
This commit is contained in:
parent
973840565e
commit
6d761baef8
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
@ -69,7 +69,19 @@ jobs:
|
|||||||
- run: npm ls urchin
|
- run: npm ls urchin
|
||||||
- run: npx which urchin
|
- run: npx which urchin
|
||||||
- run: env
|
- 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:
|
nvm:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user