feat: add expo 56 support beta testing#363
Conversation
| - name: Apply Expo beta to ExpoApp56 | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "~55.0.23" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Install Expo beta dependencies | ||
| run: | | ||
| cd apps/ExpoApp56 | ||
| npx expo install --fix | ||
|
|
||
| - name: Run ExpoApp56 -> AndroidApp road test | ||
| uses: ./.github/actions/androidapp-road-test | ||
| with: | ||
| flavor: expo56 | ||
| rn-project-path: apps/ExpoApp56 | ||
| rn-project-maven-path: com/callstack/rnbrownfield/demo/expoapp56/brownfieldlib |
There was a problem hiding this comment.
Can we make this ExpoAppBeta?
artus9033
left a comment
There was a problem hiding this comment.
I left a few comments on the approach so we reduce the committed code for maintainability & a cleaner way to do this. This is mostly cosmetic, other than that, it's great work & we're on the right track!
| - name: Apply Expo beta to ExpoApp56 | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "~55.0.23" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Install Expo beta dependencies | ||
| run: | | ||
| cd apps/ExpoApp56 | ||
| npx expo install --fix | ||
|
|
||
| - name: Run ExpoApp56 -> AppleApp road test | ||
| uses: ./.github/actions/appleapp-road-test | ||
| with: | ||
| variant: expo56 | ||
| rn-project-path: apps/ExpoApp56 |
| create("expo56") { | ||
| dimension = "app" | ||
| } |
| [libraries] | ||
| androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } | ||
| brownfieldlib-expo55 = { module = "com.callstack.rnbrownfield.demo.expoapp55:brownfieldlib", version.ref = "brownfieldlib" } | ||
| brownfieldlib-expo56 = { module = "com.callstack.rnbrownfield.demo.expoapp56:brownfieldlib", version.ref = "brownfieldlib" } |
| BuildableName = "Brownfield Apple App (ExpoApp56).app" | ||
| BlueprintName = "Brownfield Apple App (ExpoApp56)" | ||
| ReferencedContainer = "container:Brownfield Apple App.xcodeproj"> |
| if (shouldTest && options.apply) { | ||
| const packageJson = readExpoApp56PackageJson(); | ||
| applied = updateExpoVersion(packageJson, latestVersion); | ||
| if (applied) { | ||
| writeExpoApp56PackageJson(packageJson); | ||
| } | ||
| } |
There was a problem hiding this comment.
Can we not commit the expo beta app to the git repo, instead make this script generate it on-the-fly with create-expo-app with the right expo version flag; then let's inject brownfield plugin into it from this script. WDYT @hurali97 @valentin-callstack ?
| "build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo55", | ||
| "build:example:ios-consumer:expo54": "node prepareXCFrameworks.js --appName ExpoApp54 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 54\" -configuration Release", | ||
| "build:example:ios-consumer:expo55": "node prepareXCFrameworks.js --appName ExpoApp55 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 55\" -configuration Release", | ||
| "build:example:ios-consumer:expo56": "node prepareXCFrameworks.js --appName ExpoApp56 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 56\" -configuration Release", |
There was a problem hiding this comment.
let's do 2 things:
ExpoAppBeta- let's make this script actually re-generate that dir - please see more here: https://github.com/callstack/react-native-brownfield/pull/363/changes#r3388048979
| const EXPO_APP_56_PACKAGE_JSON_PATH = path.join( | ||
| REPO_ROOT, | ||
| 'apps', | ||
| 'ExpoApp56', |
There was a problem hiding this comment.
same here - let's do ExpoAppBeta
| - `ExpoApp56` - a canary Expo application used to test incoming Expo beta releases before support lands in the stable CI matrix | ||
| - `AndroidApp` - the native Android application that integrates the RNApp AAR package (a "consumer" of the RNApp library); it comes in two flavors: | ||
| - `expo` - which uses the artifact produced from `ExpoApp` | ||
| - `vanilla` - which uses the artifact produced from `RNApp` | ||
| - `AppleApp` - the native iOS application that integrates packaged XCFrameworks (a "consumer" of the RN apps); the Xcode project defines one target per consumed RN app: | ||
| - `Brownfield Apple App (RNApp)` — vanilla; uses the artifact from `RNApp` (scheme **Brownfield Apple App Vanilla**, configuration `Release Vanilla`) | ||
| - `Brownfield Apple App (ExpoApp54)` — uses the artifact from `ExpoApp54` (scheme **Brownfield Apple App Expo 54**, configuration `Release`) | ||
| - `Brownfield Apple App (ExpoApp55)` — uses the artifact from `ExpoApp55` (scheme **Brownfield Apple App Expo 55**, configuration `Release`) | ||
| - `Brownfield Apple App (ExpoApp56)` — uses the artifact from `ExpoApp56` (scheme **Brownfield Apple App Expo 56**, configuration `Release`) |
There was a problem hiding this comment.
Let's do ExpoAppBeta + note it'll be generated on-the-fly, not committed, as in https://github.com/callstack/react-native-brownfield/pull/363/changes#r3388048979
|
Waiting on your review @hurali97 . After that + CI green, let's ship it! |
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated “Expo beta” road-test path intended to validate upcoming Expo SDK beta releases (e.g., SDK 56) against the repo’s existing AndroidApp/AppleApp consumer builds before stable support is added.
Changes:
- Add a script to detect the latest Expo beta, generate
apps/ExpoAppBetafromExpoApp55, and (optionally) apply the detected Expo version. - Add a scheduled GitHub Actions workflow to run Android + iOS road tests for the detected Expo beta and record success via an artifact marker / create issues on failure.
- Add new Android flavor and iOS scheme/target + build scripts for the “expobeta” consumer variants.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/check-expo-beta.ts | Implements Expo beta detection and on-the-fly generation/updating of ExpoAppBeta. |
| scripts/tests/check-expo-beta.test.ts | Adds unit tests for updateExpoVersion. |
| apps/README.md | Documents ExpoAppBeta and how to build the new AppleApp consumer variant. |
| apps/AppleApp/package.json | Adds build:example:ios-consumer:expobeta script. |
| apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo Beta.xcscheme | Adds a shared Xcode scheme for the Expo beta consumer target. |
| apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj | Adds an Expo beta AppleApp target and framework embed/link configuration. |
| apps/AndroidApp/package.json | Adds build:example:android-consumer:expobeta script. |
| apps/AndroidApp/gradle/libs.versions.toml | Adds a new brownfieldlib-expobeta dependency coordinate. |
| apps/AndroidApp/app/build.gradle.kts | Adds the expobeta flavor and wires its dependency. |
| .github/workflows/expo-beta-road-test.yml | Adds a scheduled/manual workflow to detect and road-test Expo betas on Android and iOS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const versions = Object.keys(data.versions ?? {}).filter((version) => | ||
| version.includes('beta') | ||
| ); | ||
|
|
||
| return versions.at(-1) ?? null; |
| updateFileContents(EXPO_BETA_PACKAGE_JSON_PATH, (contents) => | ||
| contents | ||
| .replaceAll('@callstack/brownfield-example-expo-app-55', '@callstack/brownfield-example-expo-app-beta') | ||
| .replaceAll('ExpoApp55', 'ExpoAppBeta') | ||
| .replaceAll('expoapp55', 'expoappbeta') | ||
| .replaceAll('expoapp56', 'expoappbeta') | ||
| .replaceAll('expoappbeta55', 'expoappbeta') | ||
| ); |
| - name: Generate and apply Expo beta to ExpoAppBeta | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "~54.0.34" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" |
| - name: Generate and apply Expo beta to ExpoAppBeta | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "~54.0.34" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" |
| - name: Run ExpoAppBeta -> AppleApp road test | ||
| uses: ./.github/actions/appleapp-road-test | ||
| with: | ||
| variant: expobeta | ||
| rn-project-path: apps/ExpoAppBeta |
Summary
Test plan