Skip to content

Commit c332a24

Browse files
fix: update scripts
1 parent 75c6e00 commit c332a24

5 files changed

Lines changed: 42 additions & 40 deletions

File tree

.github/CI_DOCUMENTATION.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ All workflows use standardized tooling versions to ensure consistency:
5353
5454
### Test Configuration
5555

56-
| Tool | Version | Defined In |
57-
| ------------------------ | ------------------------ | ----------------------- |
58-
| **React Native Harness** | `1.0.0-alpha.21` | `package.json` |
59-
| **Android Emulator** | Pixel_API_34 (API 34) | `rn-harness.config.mjs` |
60-
| **iOS Simulator** | iPhone 17 Pro (iOS 26.0) | `rn-harness.config.mjs` |
56+
| Tool | Version | Defined In |
57+
| ------------------------ | --------------------- | ----------------------- |
58+
| **React Native Harness** | `1.0.0-alpha.21` | `package.json` |
59+
| **Android Emulator** | Pixel_API_34 (API 34) | `rn-harness.config.mjs` |
60+
| **iOS Simulator** | iPhone 17 (iOS 26.0) | `rn-harness.config.mjs` |
6161

6262
### GitHub Actions
6363

@@ -82,6 +82,7 @@ All actions are pinned to specific commit SHAs for security and reproducibility:
8282

8383
- `rn-harness.config.mjs` (test configuration)
8484
- `ios.yml` (xcodebuild destination)
85+
- `example/package.json` (ios:simulator:build script)
8586
- Must be available in the specified Xcode version
8687

8788
2. **Xcode Version**: Must match in:
@@ -152,7 +153,7 @@ runners: [
152153
}),
153154
applePlatform({
154155
name: 'ios',
155-
device: appleSimulator('iPhone 17 Pro', '26.0'),
156+
device: appleSimulator('iPhone 17', '26.0'),
156157
bundleId: 'mendixnative.example',
157158
}),
158159
];
@@ -196,7 +197,7 @@ yarn harness:android:full
196197

197198
**iOS simulator not found or fails to boot:**
198199

199-
- Verify simulator model exists in Xcode version (`iPhone 17 Pro`)
200+
- Verify simulator model exists in Xcode version (`iPhone 17`)
200201
- Check iOS version compatibility (`26.0`)
201202
- Review simulator-action logs for setup errors
202203
- Ensure device name matches harness config exactly

.github/workflows/android.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ jobs:
8585
# Build APK (only if not cached)
8686
- name: Build APK with Gradle
8787
if: steps.cache-apk.outputs.cache-hit != 'true'
88-
run: ./gradlew assembleDebug
89-
working-directory: example/android
88+
working-directory: example
89+
run: yarn app:package:android
9090

9191
# Create AVD (only if not cached, runs after build)
9292
- name: Create AVD and generate snapshot for caching
@@ -104,7 +104,7 @@ jobs:
104104
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -memory 4096
105105
script: echo "Generated AVD snapshot for caching."
106106

107-
# Run tests with emulator
107+
# Launch emulator
108108
- name: Run Harness E2E tests
109109
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
110110
with:
@@ -118,9 +118,19 @@ jobs:
118118
disable-animations: true
119119
emulator-boot-timeout: 900
120120
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -memory 4096
121-
script: |
122-
adb install -r "./android/app/build/outputs/apk/debug/app-debug.apk"
123-
yarn harness:android
121+
# script: |
122+
# yarn app:install:android
123+
# yarn harness:android
124+
125+
# Install app on simulator
126+
- name: Install app on simulator
127+
working-directory: example
128+
run: yarn app:install:android
129+
130+
# Run tests
131+
- name: Run Harness E2E tests
132+
working-directory: example
133+
run: yarn harness:android
124134

125135
# Cleanup
126136
- name: Stop Gradle Daemon

.github/workflows/ios.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
env:
7-
DEVICE_MODEL: 'iPhone 17 Pro'
7+
DEVICE_MODEL: 'iPhone 17'
88
IOS_VERSION: '26.0'
99
USE_CCACHE: 1
1010

@@ -66,23 +66,13 @@ jobs:
6666
- name: Install CocoaPods
6767
if: steps.cache-ios-app.outputs.cache-hit != 'true'
6868
working-directory: example
69-
run: |
70-
bundle install
71-
cd ios && bundle exec pod install
69+
run: yarn pod
7270

7371
# Build iOS app (only if not cached)
7472
- name: Build iOS app for simulator
7573
if: steps.cache-ios-app.outputs.cache-hit != 'true'
76-
working-directory: example/ios
77-
run: |
78-
xcodebuild \
79-
-workspace MendixNativeExample.xcworkspace \
80-
-scheme MendixNativeExample \
81-
-configuration Debug \
82-
-sdk iphonesimulator \
83-
-destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' \
84-
-derivedDataPath build \
85-
build
74+
working-directory: example
75+
run: yarn app:package:ios
8676

8777
# Setup simulator (after build)
8878
- name: Setup iOS Simulator
@@ -96,8 +86,8 @@ jobs:
9686

9787
# Install app on simulator
9888
- name: Install app on simulator
99-
run: |
100-
xcrun simctl install booted example/ios/build/Build/Products/Debug-iphonesimulator/MendixNativeExample.app
89+
working-directory: example
90+
run: yarn app:install:ios
10191

10292
# Run tests
10393
- name: Run Harness E2E tests

example/package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
"start": "react-native start",
99
"build:android": "react-native build-android --extra-params \"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\"",
1010
"build:ios": "react-native build-ios --mode Debug",
11-
"pod": "(cd ios && bundle install && bundle exec pod install)",
11+
"pod": "bundle install && bundle exec pod install --project-directory=ios",
12+
"app:package:ios": "xcodebuild -workspace ios/MendixNativeExample.xcworkspace -scheme MendixNativeExample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' -derivedDataPath ios/build build",
13+
"app:install:ios": "xcrun simctl install booted ios/build/Build/Products/Debug-iphonesimulator/MendixNativeExample.app",
14+
"app:package:android": "(cd android && ./gradlew assembleDebug --no-daemon)",
15+
"app:install:android": "adb install -r android/app/build/outputs/apk/debug/app-debug.apk",
1216
"harness": "react-native-harness",
13-
"harness:all": "yarn harness:android:full && yarn harness:ios:full",
14-
"harness:ios": "react-native-harness --harnessRunner ios",
15-
"harness:android:full": "yarn android:emulator:build && yarn android:emulator:install && yarn harness:android",
16-
"harness:ios:full": "yarn ios:simulator:build && yarn ios:simulator:install && yarn harness:ios",
17-
"harness:android": "react-native-harness --harnessRunner android",
18-
"ios:simulator:build": "xcodebuild -workspace ios/MendixNativeExample.xcworkspace -scheme MendixNativeExample -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' -derivedDataPath ios/build build",
19-
"ios:simulator:install": "xcrun simctl install booted ios/build/Build/Products/Debug-iphonesimulator/MendixNativeExample.app",
20-
"android:emulator:build": "(cd android && ./gradlew assembleDebug --no-daemon --build-cache)",
21-
"android:emulator:install": "adb install -r android/app/build/outputs/apk/debug/app-debug.apk"
17+
"harness:ios": "yarn harness --harnessRunner ios",
18+
"harness:android": "yarn harness --harnessRunner android",
19+
"harness:all": "yarn harness:ios && yarn harness:android",
20+
"harness:all:with:build": "yarn harness:ios:with:build && yarn harness:android:with:build",
21+
"harness:android:with:build": "yarn app:package:android && yarn app:install:android && yarn harness:android",
22+
"harness:ios:with:build": "yarn app:package:ios && yarn app:install:ios && yarn harness:ios"
2223
},
2324
"dependencies": {
2425
"@op-engineering/op-sqlite": "15.1.5",

example/rn-harness.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const config = {
2525
}),
2626
applePlatform({
2727
name: 'ios',
28-
device: appleSimulator('iPhone 17 Pro', '26.0'),
28+
device: appleSimulator('iPhone 17', '26.0'),
2929
bundleId: 'mendixnative.example',
3030
}),
3131
],

0 commit comments

Comments
 (0)