diff --git a/.github/actions/run-fantom-tests/action.yml b/.github/actions/run-fantom-tests/action.yml index a84f0bec1261..8a6fdcd832ac 100644 --- a/.github/actions/run-fantom-tests/action.yml +++ b/.github/actions/run-fantom-tests/action.yml @@ -27,11 +27,17 @@ runs: run: | for attempt in 1 2 3; do echo "Attempt $attempt of 3" - if yarn fantom; then - exit 0 + if [ "$attempt" -eq 1 ]; then + if yarn fantom; then + exit 0 + fi + else + if yarn fantom --onlyFailures; then + exit 0 + fi fi if [ "$attempt" -lt 3 ]; then - echo "Attempt $attempt failed. Retrying..." + echo "Attempt $attempt failed. Retrying only failed tests..." fi done echo "All 3 attempts failed."