@@ -549,11 +549,12 @@ jobs:
549549
550550 - name : Run Detox Tests
551551 working-directory : example
552- run : npm run test:e2e:ios || true
552+ run : npm run test:e2e:ios
553+ continue-on-error : true
553554 id : detox_ios_tests
554555
555556 - name : Check for iOS snapshot differences
556- if : always()
557+ if : failure() && steps.detox_ios_tests.outcome == 'failure'
557558 working-directory : example
558559 run : |
559560 if [ -d "e2e/snapshots/output" ] && [ "$(ls -A e2e/snapshots/output 2>/dev/null)" ]; then
@@ -603,6 +604,12 @@ jobs:
603604 example/e2e/test-results/**/*
604605 example/artifacts/**/*.xml
605606
607+ - name : Fail CI if iOS tests failed
608+ if : steps.detox_ios_tests.outcome == 'failure'
609+ run : |
610+ echo "❌ iOS Detox tests failed - failing CI"
611+ exit 1
612+
606613 test-detox-android :
607614 name : Detox E2E Tests (Android)
608615 runs-on : ubuntu-latest
@@ -680,6 +687,7 @@ jobs:
680687
681688 - name : Create AVD and run Detox tests
682689 uses : reactivecircus/android-emulator-runner@v2
690+ id : detox_android_tests
683691 with :
684692 api-level : 28
685693 target : google_apis
@@ -747,6 +755,12 @@ jobs:
747755 example/e2e/test-results/**/*
748756 example/artifacts/**/*.xml
749757
758+ - name : Fail CI if Android tests failed
759+ if : steps.detox_android_tests.outcome == 'failure'
760+ run : |
761+ echo "❌ Android Detox tests failed - failing CI"
762+ exit 1
763+
750764 build-web-example :
751765 name : Build Web Example
752766 runs-on : ubuntu-latest
0 commit comments