chore: app harness for testing RN/Expo apps with configurable dependency versions - #8994
chore: app harness for testing RN/Expo apps with configurable dependency versions#8994russellwheatley wants to merge 33 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces two new harness applications—one for bare React Native CLI and one for Expo development builds—to facilitate local validation of React Native Firebase packages. The changes include project scaffolding, configuration files, and utility scripts for syncing dependencies and building the apps. Feedback highlights critical issues with non-existent dependency versions and incorrect relative paths to node_modules that would fail in a hoisted workspace environment. Additionally, suggestions were made to improve script portability by replacing ripgrep with grep, to refine cleanup logic to prevent accidental data loss, and to ensure Metro resolves modules from the repository root.
…ADME in root of apps/
|
Hello 👋, this PR has been opened for more than 14 days with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
Bring the Expo/RN build harness up to date with current SPM and docs work.
Root package.json resolutions force-pin react-native, @react-native/codegen, and @types/react repo-wide so packages/*, tests/, and apps/build-harness stay on one consistent version. That pin got bumped directly during Expo harness work to unblock apps/build-harness-expo, which silently would have forced every other workspace onto the harness's newer react-native too. Add scripts/check-root-rn-pin.mjs (wired into yarn lint) to fail fast if that pin drifts again, and scripts/dev-harness-versions.sh to let an apps/ harness resolve its own react-native version for local testing without ever risking a commit: it removes the pin, reinstalls, and marks package.json/yarn.lock skip-worktree so git can't see or commit the change until `off` restores it.
Adds .github/workflows/build_harness_expo_latest_rn.yml, an iOS-only job that builds the Expo harness (Debug and Release) against apps/ build-harness-expo's own declared react-native version by removing the root resolutions pin first (scripts/dev-harness-versions.sh on), instead of the version build_harnesses.yml's existing expo matrix entry silently gets forced onto. Wraps the new steps as root package.json scripts (harness:expo:*) rather than inlining them in the workflow, matching the existing tests:ios:build* convention. Confirmed locally: sync/prebuild/resolution all work correctly (build- harness-expo resolves react-native@0.83.10 while other workspaces stay on 0.78.3), but the Debug build currently fails with the FIRApp/SPM undefined symbol bug from #9158 on this branch, since that fix lives on the separate fix/spm-expo-9158 branch and hasn't landed here yet.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8994 +/- ##
============================================
+ Coverage 64.85% 64.90% +0.06%
Complexity 1911 1911
============================================
Files 526 526
Lines 39671 39738 +67
Branches 5717 5725 +8
============================================
+ Hits 25723 25787 +64
+ Misses 12126 12123 -3
- Partials 1822 1828 +6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…arnesses.yml Removes the harness:expo:* scripts added alongside the latest-RN POC workflow in favor of the existing app:expo:* naming convention, adding prebuild-ios/build-ios-debug/build-ios-release subcommands to sync-build-harness-expo.sh so the workflow no longer needs bespoke one-liners. Drops build_harnesses.yml for now; build_harness_expo_latest_rn.yml covers iOS going forward and the old workflow stays in git history.
Yarn auto-enables hardened mode (immutable installs) on public PR runs, which blocked the deliberate resolutions-pin removal in scripts/dev-harness-versions.sh with "the lockfile would have been modified by this install, which is explicitly forbidden".
Disabling hardened mode alone wasn't enough; enableImmutableInstalls defaults to true whenever Yarn detects a CI env, independently of hardened mode, and was still blocking the deliberate lockfile change. Reproduced locally with CI=true before and after the fix.
yarn's own CLI parser swallows a literal "--" separator instead of forwarding it, so the Sync step's --ios-google-services/ --android-google-services flags never reached sync-build-harness-expo.sh and it fell back to the default plist path, which doesn't exist on CI runners. Also drop the CocoaPods cache step: nothing in this workflow (or any other) ever saves to that cache key, so it was a guaranteed miss. It also would have been the wrong thing to add back given this job disables Yarn's hardened mode and immutable installs to bump react-native off the root pin - caching output from a run that bypassed those lockfile-integrity checks risks a supply-chain-compromised package getting saved and reused by another workflow.
Description
Related issues
Release Summary
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter