-
Notifications
You must be signed in to change notification settings - Fork 40
feat: add expo 56 support beta testing #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
acd0cb0
63acd24
7ea2c31
9826a82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| name: Expo beta road test | ||
| run-name: Expo beta road test | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 */2 * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Detect Expo beta to test | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| latest_version: ${{ steps.finalize.outputs.latest_version }} | ||
| should_test: ${{ steps.finalize.outputs.should_test }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - name: Detect latest Expo beta | ||
| id: detect | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --github-output "$GITHUB_OUTPUT" --github-step-summary "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Check whether this Expo beta was already tested | ||
| id: tested | ||
| if: steps.detect.outputs.latest_version != '' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| artifact_id=$(gh api \ | ||
| "/repos/${{ github.repository }}/actions/artifacts?per_page=100" \ | ||
| --jq '.artifacts[] | select(.expired == false) | select(.name == "expo-beta-tested-${{ steps.detect.outputs.latest_version }}") | .id' \ | ||
| | head -n 1) | ||
|
|
||
| if [ -n "$artifact_id" ]; then | ||
| echo "already_tested=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "already_tested=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Finalize test decision | ||
| id: finalize | ||
| run: | | ||
| should_test="${{ steps.detect.outputs.should_test }}" | ||
|
|
||
| if [ "${{ steps.tested.outputs.already_tested || 'false' }}" = 'true' ]; then | ||
| should_test='false' | ||
| fi | ||
|
|
||
| echo "latest_version=${{ steps.detect.outputs.latest_version }}" >> "$GITHUB_OUTPUT" | ||
| echo "should_test=${should_test}" >> "$GITHUB_OUTPUT" | ||
| { | ||
| echo "- Already tested successfully: ${{ steps.tested.outputs.already_tested || 'false' }}" | ||
| echo "- Final should run road tests: ${should_test}" | ||
| echo | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| android: | ||
| name: Android road test (Expo beta) | ||
| runs-on: ubuntu-latest | ||
| needs: prepare | ||
| if: needs.prepare.outputs.should_test == 'true' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - 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 | ||
|
|
||
| ios: | ||
| name: iOS road test (Expo beta) | ||
| runs-on: macos-26 | ||
| needs: prepare | ||
| if: needs.prepare.outputs.should_test == 'true' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
|
|
||
| - 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 | ||
|
Comment on lines
+95
to
+107
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
|
|
||
| record-success: | ||
| name: Record tested Expo beta | ||
| runs-on: ubuntu-latest | ||
| needs: [prepare, android, ios] | ||
| if: | | ||
| needs.prepare.outputs.should_test == 'true' && | ||
| needs.android.result == 'success' && | ||
| needs.ios.result == 'success' | ||
| steps: | ||
| - name: Create Expo beta success marker | ||
| run: | | ||
| mkdir -p expo-beta-test-result | ||
| printf '%s\n' '${{ needs.prepare.outputs.latest_version }}' > expo-beta-test-result/version.txt | ||
|
|
||
| - name: Upload Expo beta success marker | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: expo-beta-tested-${{ needs.prepare.outputs.latest_version }} | ||
| path: expo-beta-test-result/version.txt | ||
| retention-days: 90 | ||
|
|
||
| summarize: | ||
| name: Summarize Expo beta road test | ||
| runs-on: ubuntu-latest | ||
| needs: [prepare, android, ios, record-success] | ||
| if: always() | ||
| steps: | ||
| - name: Write workflow summary | ||
| run: | | ||
| { | ||
| echo "## Expo beta road test results" | ||
| echo | ||
| echo "- Expo beta version: ${{ needs.prepare.outputs.latest_version || 'not found' }}" | ||
| echo "- Android result: ${{ needs.android.result || 'skipped' }}" | ||
| echo "- iOS result: ${{ needs.ios.result || 'skipped' }}" | ||
| echo | ||
| if [ "${{ needs.prepare.outputs.should_test }}" != "true" ]; then | ||
| echo "No new untested Expo beta required testing." | ||
| else | ||
| echo "- Success marker uploaded: ${{ needs.record-success.result == 'success' && 'yes' || 'no' }}" | ||
| fi | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Fail if road test failed | ||
| if: | | ||
| needs.prepare.outputs.should_test == 'true' && | ||
| (needs.android.result == 'failure' || needs.ios.result == 'failure') | ||
| run: exit 1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,9 @@ android { | |
| create("expo55") { | ||
| dimension = "app" | ||
| } | ||
| create("expo56") { | ||
| dimension = "app" | ||
| } | ||
|
Comment on lines
+38
to
+40
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's go with |
||
| create("vanilla") { | ||
| dimension = "app" | ||
| } | ||
|
|
@@ -72,6 +75,7 @@ dependencies { | |
| implementation(libs.androidx.compose.material3) | ||
| implementation(libs.androidx.appcompat) | ||
| add("expo55Implementation", libs.brownfieldlib.expo55) | ||
| add("expo56Implementation", libs.brownfieldlib.expo56) | ||
| add("expo54Implementation", libs.brownfieldlib.expo54) | ||
| add("vanillaImplementation", libs.brownfieldlib.vanilla) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ gson = "2.13.2" | |
| [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" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's do |
||
| brownfieldlib-expo54 = { module = "com.callstack.rnbrownfield.demo.expoapp54:brownfieldlib", version.ref = "brownfieldlib" } | ||
| brownfieldlib-vanilla = { module = "com.rnapp:brownfieldlib", version.ref = "brownfieldlib" } | ||
| junit = { group = "junit", name = "junit", version.ref = "junit" } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this
ExpoAppBeta?