We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3409036 commit 7b4c02cCopy full SHA for 7b4c02c
.github/workflows/tests.yml
@@ -125,4 +125,4 @@ jobs:
125
git config --global user.name "$GITHUB_ACTOR"
126
git config --global user.email "<>"
127
128
- ./run.sh
+ ./run_retry.sh
app-tests/run_retry.sh
@@ -0,0 +1,19 @@
1
+#!/bin/bash
2
+# Reduce flaky tests by retrying them
3
+
4
+MAX_RETRIES=5
5
+RETRY_COUNT=0
6
7
+while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
8
+ echo "Running test (attempt $((RETRY_COUNT+1)) of $MAX_RETRIES)..."
9
+ ./run-your-tests-command.sh && break
10
+ RETRY_COUNT=$((RETRY_COUNT + 1))
11
+ echo "Test failed, retrying..."
12
+done
13
14
+if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then
15
+ echo "Tests failed after $MAX_RETRIES attempts."
16
+ exit 1
17
+fi
18
19
+echo "Tests passed successfully."
0 commit comments