Skip to content

Commit ea79cb6

Browse files
committed
Bundle, build and run app separately
1 parent 90435c2 commit ea79cb6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/check.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,17 @@ jobs:
187187
- run: npm run init-macos-test-app
188188
- run: pod install --project-directory=macos
189189
working-directory: apps/macos-test-app
190-
- name: Upload node-addon-examples
191-
uses: actions/upload-artifact@v6
192-
with:
193-
name: node-addon-examples
194-
path: node_modules/@react-native-node-api/node-addon-examples
195-
- name: Run MacOS test app
196-
# TODO: Enable release mode when the 'Bundle React Native code and images' build phase doesn't fail on CI
197-
# run: npm run test:allTests -- --mode Release
198-
run: npm run test:allTests
190+
- name: Bundle test app
191+
run: npx react-native bundle --entry-file index.js --platform macos --dev false --minify false --bundle-output dist/main.macos.jsbundle --assets-dest dist/res
192+
working-directory: apps/macos-test-app
193+
- name: Build test app
194+
run: xcodebuild archive -workspace MacOSTestApp.xcworkspace -configuration Release -scheme MacOSTestApp-macOS -destination generic/platform="macOS" -archivePath ./build/macos-test-app.xcarchive | xcbeautify
195+
working-directory: apps/macos-test-app/macos
196+
- name: Run test app
197+
run: npx mocha-remote --exit-on-error -- macos/build/macos-test-app.xcarchive/Products/Applications/MacOSTestApp.app/Contents/MacOS/MacOSTestApp
199198
working-directory: apps/macos-test-app
199+
env:
200+
MOCHA_REMOTE_CONTEXT: allTests
200201
test-android:
201202
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖')
202203
name: Test app (Android)

0 commit comments

Comments
 (0)