|
| 1 | +name: Test Harness iOS |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/test-harness-ios.yml" |
| 7 | + - "example/ios/**" |
| 8 | + - "example/src/tests/**" |
| 9 | + - "example/__tests__/**" |
| 10 | + - "example/rn-harness.config.mjs" |
| 11 | + - "example/jest.config.js" |
| 12 | + - "package/cpp/**" |
| 13 | + - "package/ios/**" |
| 14 | + - "**/Podfile.lock" |
| 15 | + - "**/*.podspec" |
| 16 | + - "**/react-native.config.js" |
| 17 | + - "**/nitro.json" |
| 18 | + - "**/bun.lock" |
| 19 | + |
| 20 | +jobs: |
| 21 | + test: |
| 22 | + name: Harness Tests (iOS) |
| 23 | + runs-on: macOS-26 |
| 24 | + |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v6 |
| 27 | + - uses: oven-sh/setup-bun@v2 |
| 28 | + |
| 29 | + - name: Setup Ruby (bundle) |
| 30 | + uses: ruby/setup-ruby@v1 |
| 31 | + with: |
| 32 | + ruby-version: 3.3.0 |
| 33 | + bundler-cache: true |
| 34 | + working-directory: example |
| 35 | + |
| 36 | + - name: Select Xcode 26.2 |
| 37 | + run: sudo xcode-select -s "/Applications/Xcode_26.2.app/Contents/Developer" |
| 38 | + |
| 39 | + - name: Install Pods |
| 40 | + working-directory: example |
| 41 | + run: bun pods |
| 42 | + |
| 43 | + - name: Boot iOS Simulator |
| 44 | + run: | |
| 45 | + xcrun simctl boot "iPhone 17 Pro (26.2)" || true |
| 46 | + xcrun simctl bootstatus booted -b |
| 47 | +
|
| 48 | + - name: Build and install debug app |
| 49 | + working-directory: example/ios |
| 50 | + run: | |
| 51 | + set -o pipefail |
| 52 | + xcodebuild \ |
| 53 | + CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ |
| 54 | + -derivedDataPath build -UseModernBuildSystem=YES \ |
| 55 | + -workspace NitroSQLiteExample.xcworkspace \ |
| 56 | + -scheme NitroSQLiteExample \ |
| 57 | + -sdk iphonesimulator \ |
| 58 | + -configuration Debug \ |
| 59 | + -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.2' \ |
| 60 | + ONLY_ACTIVE_ARCH=YES \ |
| 61 | + install \ |
| 62 | + CODE_SIGNING_ALLOWED=NO |
| 63 | +
|
| 64 | + - name: Run react-native-harness on iOS |
| 65 | + run: bun --cwd example run test:harness:ios |
| 66 | + |
0 commit comments