Skip to content

Commit 277f998

Browse files
author
Roman
committed
apply retry to run e2e test
1 parent 5888ce0 commit 277f998

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/e2e-subtensor-tests.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,26 @@ jobs:
101101
- name: Load Docker Image
102102
run: docker load -i subtensor-localnet.tar
103103

104-
- name: Run tests
105-
run: uv run pytest ${{ matrix.test-file }} -s
104+
# - name: Run tests
105+
# run: uv run pytest ${{ matrix.test-file }} -s
106+
107+
- name: Run tests with retry
108+
run: |
109+
set +e
110+
for i in 1 2; do
111+
echo "🔁 Attempt $i: Running tests"
112+
uv run pytest ${{ matrix.test-file }} -s
113+
status=$?
114+
if [ $status -eq 0 ]; then
115+
echo "✅ Tests passed on attempt $i"
116+
break
117+
else
118+
echo "❌ Tests failed on attempt $i"
119+
if [ $i -eq 2 ]; then
120+
echo "Tests failed after 2 attempts"
121+
exit 1
122+
fi
123+
echo "Retrying..."
124+
sleep 5
125+
fi
126+
done

0 commit comments

Comments
 (0)