From 8f46bcf588921bf3566010118be83b4ed7b92f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Sat, 14 Feb 2026 12:07:55 +0100 Subject: [PATCH 1/5] Run MacOS debug builds on CI --- .github/workflows/check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 99fa9365..a421e171 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -151,7 +151,7 @@ jobs: - name: Run tests (iOS) run: npm run test:ios:allTests # TODO: Enable release mode when it works - # run: npm run test:ios -- --mode Release + # run: npm run test:ios:allTests -- --mode Release working-directory: apps/test-app test-macos: # Disabling this on main for now, as initializing the template takes a long time and @@ -188,7 +188,9 @@ jobs: - run: pod install --project-directory=macos working-directory: apps/macos-test-app - name: Run MacOS test app - run: npm run test:allTests -- --mode Release + # TODO: Enable release mode when the 'Bundle React Native code and images' build phase doesn't fail on CI + # run: npm run test:allTests -- --mode Release + run: npm run test:allTests working-directory: apps/macos-test-app test-android: if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖') From 78e969c0a76d69eafa9d90381d71f4e83ec0b834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Sat, 14 Feb 2026 15:48:10 +0100 Subject: [PATCH 2/5] Upload node-addon-examples --- .github/workflows/check.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a421e171..a721db51 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -187,6 +187,11 @@ jobs: - run: npm run init-macos-test-app - run: pod install --project-directory=macos working-directory: apps/macos-test-app + - name: Upload node-addon-examples + uses: actions/upload-artifact@v6 + with: + name: node-addon-examples + path: node_modules/@react-native-node-api/node-addon-examples - name: Run MacOS test app # TODO: Enable release mode when the 'Bundle React Native code and images' build phase doesn't fail on CI # run: npm run test:allTests -- --mode Release From 90435c2f94d689c9a4471c36c833e78bd2296ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Sat, 14 Feb 2026 15:53:21 +0100 Subject: [PATCH 3/5] Print watchFolders --- apps/test-app/metro.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/test-app/metro.config.js b/apps/test-app/metro.config.js index 95e22157..aba9b038 100644 --- a/apps/test-app/metro.config.js +++ b/apps/test-app/metro.config.js @@ -11,6 +11,8 @@ const config = makeMetroConfig({ }, }); +console.log("watchFolders =", config.watchFolders); + if (config.watchFolders.length === 0) { // This patch is needed to locate packages in the monorepo from the MacOS app // which is intentionally kept outside of the workspaces configuration to prevent From ea79cb65cacc3a5596d767ba24a0396d186dbbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Sat, 14 Feb 2026 16:15:32 +0100 Subject: [PATCH 4/5] Bundle, build and run app separately --- .github/workflows/check.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a721db51..3eb58e0e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -187,16 +187,17 @@ jobs: - run: npm run init-macos-test-app - run: pod install --project-directory=macos working-directory: apps/macos-test-app - - name: Upload node-addon-examples - uses: actions/upload-artifact@v6 - with: - name: node-addon-examples - path: node_modules/@react-native-node-api/node-addon-examples - - name: Run MacOS test app - # TODO: Enable release mode when the 'Bundle React Native code and images' build phase doesn't fail on CI - # run: npm run test:allTests -- --mode Release - run: npm run test:allTests + - name: Bundle test app + 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 + working-directory: apps/macos-test-app + - name: Build test app + run: xcodebuild archive -workspace MacOSTestApp.xcworkspace -configuration Release -scheme MacOSTestApp-macOS -destination generic/platform="macOS" -archivePath ./build/macos-test-app.xcarchive | xcbeautify + working-directory: apps/macos-test-app/macos + - name: Run test app + run: npx mocha-remote --exit-on-error -- macos/build/macos-test-app.xcarchive/Products/Applications/MacOSTestApp.app/Contents/MacOS/MacOSTestApp working-directory: apps/macos-test-app + env: + MOCHA_REMOTE_CONTEXT: allTests test-android: if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖') name: Test app (Android) From 8d8f64e0fbdf14c236b59524df3528649bcd1843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Sat, 14 Feb 2026 19:35:21 +0100 Subject: [PATCH 5/5] Use project root instead of empty watch folders to detect macos --- apps/test-app/metro.config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/test-app/metro.config.js b/apps/test-app/metro.config.js index aba9b038..395431b6 100644 --- a/apps/test-app/metro.config.js +++ b/apps/test-app/metro.config.js @@ -11,9 +11,7 @@ const config = makeMetroConfig({ }, }); -console.log("watchFolders =", config.watchFolders); - -if (config.watchFolders.length === 0) { +if (config.projectRoot.endsWith("macos-test-app")) { // This patch is needed to locate packages in the monorepo from the MacOS app // which is intentionally kept outside of the workspaces configuration to prevent // duplicate react-native version and pollution of the package lock.