Skip to content

Commit 7357be1

Browse files
abueideclaude
andcommitted
fix(tests): add setup phase to all E2E test suites
Update all test suites to call `devbox run setup` before starting builds: - examples/android/tests/test-suite.yaml - examples/ios/tests/test-suite.yaml - examples/react-native/tests/test-suite-android-e2e.yaml - examples/react-native/tests/test-suite-ios-e2e.yaml - examples/react-native/tests/test-suite-web-e2e.yaml - examples/react-native/tests/test-suite-all-e2e.yaml Setup phase ensures SDK evaluation completes before parallel build phases start, eliminating race conditions where gradle/xcodebuild would fail with "SDK not found" errors on fresh CI runners. The setup-sdk process: - Runs first (no dependencies) - Other phases depend on it (build-app, sync-avds, sync-simulators, etc.) - Respects skip flags set in environment section This fixes the test failures observed in PR #4 (Dependabot actions/checkout v6) where Android and iOS E2E tests failed due to SDK not being ready. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent ccb7a20 commit 7357be1

6 files changed

Lines changed: 66 additions & 2 deletions

File tree

examples/android/tests/test-suite.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ log_level: info
1010
is_strict: true
1111

1212
processes:
13-
# Phase 1: Build app (runs concurrently with emulator startup)
13+
# Phase 0: Setup - ensure Android SDK is evaluated and ready
14+
setup-sdk:
15+
command: "setup"
16+
availability:
17+
restart: "no"
18+
19+
# Phase 1: Build app (depends on SDK setup)
1420
build-app:
21+
depends_on:
22+
setup-sdk:
23+
condition: process_completed_successfully
1524
command: |
1625
set -e
1726
_step="build-app"
@@ -27,6 +36,9 @@ processes:
2736

2837
# Phase 2a: Sync AVDs - ensure all AVDs match device definitions
2938
sync-avds:
39+
depends_on:
40+
setup-sdk:
41+
condition: process_completed_successfully
3042
command: "android.sh devices sync"
3143
availability:
3244
restart: "no"

examples/ios/tests/test-suite.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ log_level: info
99
is_strict: true
1010

1111
processes:
12-
# Phase 1: Build app (runs concurrently with simulator startup)
12+
# Phase 0: Setup - ensure iOS environment is ready
13+
setup-sdk:
14+
command: "setup"
15+
availability:
16+
restart: "no"
17+
18+
# Phase 1: Build app (depends on SDK setup)
1319
build-app:
20+
depends_on:
21+
setup-sdk:
22+
condition: process_completed_successfully
1423
command: |
1524
set -e
1625
_step="build-app"
@@ -32,6 +41,9 @@ processes:
3241

3342
# Phase 2: Sync simulators - ensure all simulators match device definitions
3443
sync-simulators:
44+
depends_on:
45+
setup-sdk:
46+
condition: process_completed_successfully
3547
command: "ios.sh devices sync"
3648
availability:
3749
restart: "no"

examples/react-native/tests/test-suite-all-e2e.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,17 @@ log_level: info
1010
is_strict: true
1111

1212
processes:
13+
# Phase -1: Setup - ensure both Android and iOS environments are ready
14+
setup-sdk:
15+
command: "setup"
16+
availability:
17+
restart: "no"
18+
1319
# Phase 0: Allocate Metro port (no running process needed for builds)
1420
allocate-metro-port:
21+
depends_on:
22+
setup-sdk:
23+
condition: process_completed_successfully
1524
command: |
1625
set -e
1726
# Source React Native lib

examples/react-native/tests/test-suite-android-e2e.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ log_level: info
99
is_strict: true
1010

1111
processes:
12+
# Phase -1: Setup - ensure environment is ready
13+
setup-sdk:
14+
environment:
15+
- "IOS_SKIP_SETUP=1"
16+
command: "setup"
17+
availability:
18+
restart: "no"
19+
1220
# Phase 0: Allocate Metro port (no running process needed for builds)
1321
allocate-metro-port:
22+
depends_on:
23+
setup-sdk:
24+
condition: process_completed_successfully
1425
command: |
1526
set -e
1627
# Source React Native lib

examples/react-native/tests/test-suite-ios-e2e.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ log_level: info
1313
is_strict: true
1414

1515
processes:
16+
# Phase -1: Setup - ensure environment is ready
17+
setup-sdk:
18+
command: "setup"
19+
availability:
20+
restart: "no"
21+
1622
# Phase 0: Allocate Metro port (no running process needed for builds)
1723
allocate-metro-port:
24+
depends_on:
25+
setup-sdk:
26+
condition: process_completed_successfully
1827
command: |
1928
set -e
2029
# Source React Native lib

examples/react-native/tests/test-suite-web-e2e.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,25 @@ version: "0.5"
33
environment:
44
- "TEST_TUI=${TEST_TUI:-false}"
55
- "WEB_PORT=8081"
6+
- "ANDROID_SKIP_SETUP=1"
7+
- "IOS_SKIP_SETUP=1"
68

79
log_location: "reports/react-native-web-e2e-logs"
810
log_level: info
911
is_strict: true
1012

1113
processes:
14+
# Phase -1: Setup - ensure environment is ready (skips Android/iOS for web)
15+
setup-sdk:
16+
command: "setup"
17+
availability:
18+
restart: "no"
19+
1220
# Phase 0: Allocate Metro port
1321
allocate-metro-port:
22+
depends_on:
23+
setup-sdk:
24+
condition: process_completed_successfully
1425
command: |
1526
set -e
1627
# Source React Native lib

0 commit comments

Comments
 (0)