Skip to content

Commit cbbd9da

Browse files
abueideclaude
andcommitted
fix(rn): use plugin deploy commands and cap Android API at 35
Replace npx react-native run-android/run-ios with android.sh deploy and ios.sh build/deploy in all RN test suites. The npx commands don't write state files (app-id.txt, emulator-serial.txt) needed by android.sh app status and ios.sh app status for verification. Cap React Native max device at API 35 since RN 0.83 doesn't support API 36. Add ANDROID_COMPILE_SDK support to flake.nix so projects can compile against a different API than their device targets. Fix -e flag format in CI workflows and wrapper scripts to use key=value format required by devbox. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a31f665 commit cbbd9da

13 files changed

Lines changed: 48 additions & 29 deletions

File tree

.github/workflows/e2e-full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
TEST_TIMEOUT: 600
6767
ANDROID_DEFAULT_DEVICE: ${{ matrix.device }}
6868
TEST_TUI: false
69-
run: devbox run --pure -e EMU_HEADLESS test:e2e
69+
run: devbox run --pure -e EMU_HEADLESS="${EMU_HEADLESS}" test:e2e
7070

7171
- name: Upload reports and logs
7272
if: always()
@@ -127,7 +127,7 @@ jobs:
127127
TEST_TIMEOUT: 600
128128
IOS_DEFAULT_DEVICE: ${{ matrix.device }}
129129
TEST_TUI: false
130-
run: devbox run --pure -e SIM_HEADLESS test:e2e
130+
run: devbox run --pure -e SIM_HEADLESS="${SIM_HEADLESS}" test:e2e
131131

132132
- name: Upload reports and logs
133133
if: always()

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
TEST_TIMEOUT: 300
7575
ANDROID_DEFAULT_DEVICE: max
7676
TEST_TUI: false
77-
run: devbox run --pure -e EMU_HEADLESS test:e2e
77+
run: devbox run --pure -e EMU_HEADLESS="${EMU_HEADLESS}" test:e2e
7878

7979
- name: Upload reports and logs
8080
if: always()
@@ -127,7 +127,7 @@ jobs:
127127
TEST_TIMEOUT: 300
128128
IOS_DEFAULT_DEVICE: max
129129
TEST_TUI: false
130-
run: devbox run --pure -e SIM_HEADLESS test:e2e
130+
run: devbox run --pure -e SIM_HEADLESS="${SIM_HEADLESS}" test:e2e
131131

132132
- name: Upload reports and logs
133133
if: always()

examples/android/devbox.d/android/devices/devices.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
}
1515
],
1616
"checksum": "8df4d3393b61fbbb08e45cf8762f95c521316938e514527916e4fce88a849d57",
17-
"generated_at": "2026-02-19T05:50:43Z"
17+
"generated_at": "2026-02-19T18:07:54Z"
1818
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"devices": [
33
{
4-
"name": "medium_phone_api36",
5-
"api": 36,
4+
"name": "medium_phone_api35",
5+
"api": 35,
66
"device": "medium_phone",
77
"tag": "google_apis"
88
},
@@ -13,6 +13,6 @@
1313
"tag": "google_apis"
1414
}
1515
],
16-
"checksum": "8df4d3393b61fbbb08e45cf8762f95c521316938e514527916e4fce88a849d57",
17-
"generated_at": "2026-02-19T03:42:00Z"
16+
"checksum": "f5bfab3fdcbe8a23858954c18b1fa86d28a3316e801523aa6d4aa72ca9cf5ab7",
17+
"generated_at": "2026-02-19T18:00:02Z"
1818
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "medium_phone_api36",
3-
"api": 36,
2+
"name": "medium_phone_api35",
3+
"api": 35,
44
"device": "medium_phone",
55
"tag": "google_apis"
66
}

examples/react-native/devbox.d/ios/devices/devices.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
}
1111
],
1212
"checksum": "4d5276f203d7ad62860bfc067f76194df53be449d4aa8a3b2d069855ec1f3232",
13-
"generated_at": "2026-02-19T03:42:21Z"
13+
"generated_at": "2026-02-19T18:01:57Z"
1414
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "medium_phone_api36",
3-
"api": 36,
2+
"name": "medium_phone_api35",
3+
"api": 35,
44
"device": "medium_phone",
55
"tag": "google_apis"
66
}

examples/react-native/tests/dev-android.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ processes:
8888
command: |
8989
. ${REACT_NATIVE_VIRTENV}/metro/env-android.sh
9090
echo "Deploying React Native app (Debug, Metro port: $METRO_PORT)..."
91-
npx react-native run-android --no-packager
91+
92+
# Deploy using android.sh (APK already built by build-android)
93+
android.sh deploy
94+
9295
echo ""
9396
echo "App deployed!"
9497
echo " Metro: http://localhost:$METRO_PORT"

examples/react-native/tests/run-android-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ cd "$(dirname "$0")/.."
88

99
# Skip iOS setup for Android-only testing
1010
# Use -e flag to pass environment variable through --pure mode
11-
exec devbox run --pure -e IOS_SKIP_SETUP=1 -e EMU_HEADLESS -e TEST_TUI="${TEST_TUI:-false}" bash -c 'process-compose -f tests/test-suite-android-e2e.yaml --no-server --tui="${TEST_TUI:-false}"'
11+
exec devbox run --pure -e IOS_SKIP_SETUP=1 -e EMU_HEADLESS="${EMU_HEADLESS:-}" -e TEST_TUI="${TEST_TUI:-false}" bash -c 'process-compose -f tests/test-suite-android-e2e.yaml --no-server --tui="${TEST_TUI:-false}"'

examples/react-native/tests/run-ios-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ cd "$(dirname "$0")/.."
88

99
# Skip Android SDK downloads/evaluation for iOS-only testing
1010
# Use -e flag to pass environment variable through --pure mode
11-
exec devbox run --pure -e ANDROID_SKIP_SETUP=1 -e SIM_HEADLESS -e TEST_TUI="${TEST_TUI:-false}" bash -c 'process-compose -f tests/test-suite-ios-e2e.yaml --no-server --tui="${TEST_TUI:-false}"'
11+
exec devbox run --pure -e ANDROID_SKIP_SETUP=1 -e SIM_HEADLESS="${SIM_HEADLESS:-}" -e TEST_TUI="${TEST_TUI:-false}" bash -c 'process-compose -f tests/test-suite-ios-e2e.yaml --no-server --tui="${TEST_TUI:-false}"'

0 commit comments

Comments
 (0)