Skip to content

Commit

Permalink
feat(ci): retry ci
Browse files Browse the repository at this point in the history
Signed-off-by: Niklas Treml <[email protected]>
  • Loading branch information
niklastreml committed Jul 31, 2024
1 parent 501890a commit bdfac86
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions scripts/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ export SPARROW_BIN=$(realpath ./dist/sparrow_linux_amd64_v1/sparrow)

EXIT_CODE=0

MAX_RETRY=3

for i in $(ls e2e); do
echo "Running test e2e/$i"
cd e2e/$i
./test.sh || {
EXIT_CODE=$?
echo "E2E test e2e/$i failed"
}
cd $root
for ATTEMPT in $(seq 1 $MAX_RETRY ); do
echo "[$ATTEMPT/$MAX_RETRY] Running test e2e/$i"
cd e2e/$i
./test.sh
TEST_EXIT_CODE=$?
cd $root
if [ $TEST_EXIT_CODE -eq 0 ]; then
break
elif [ $ATTEMPT -eq $MAX_RETRY ]; then
EXIT_CODE=1
fi
done
done

exit $EXIT_CODE

0 comments on commit bdfac86

Please sign in to comment.