Rerun flaky SDK/BTCLI tests
Closed this issue ยท 0 comments
thewhaleking commented
Add to workflow:
- name: Run tests with retry
run: |
set +e
for i in 1 2 3; do
echo "๐ Attempt $i: Running tests"
uv run pytest ${{ matrix.test-file }} -s
status=$?
if [ $status -eq 0 ]; then
echo "โ
Tests passed on attempt $i"
break
else
echo "โ Tests failed on attempt $i"
if [ $i -eq 3 ]; then
echo "Tests failed after 3 attempts"
exit 1
fi
echo "Retrying..."
sleep 5
fi
done