-
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
Open
valentin-callstack
wants to merge
10
commits into
callstack:main
Choose a base branch
from
valentin-callstack:feat/add-expo-beta-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
acd0cb0
feat: add expo 56 support beta testing
valentin-callstack 63acd24
Merge branch 'main' into feat/add-expo-beta-testing
valentin-callstack 7ea2c31
chore: resolve xcode project conflict
valentin-callstack 9826a82
chore: force expo 55 smoke test
valentin-callstack ee0f5c2
feat: add Expo beta test workflow
valentin-callstack ae2c5f1
chore: force Expo 54 beta workflow smoke test
valentin-callstack 5b1fd9c
fix: address Expo beta workflow review comments
valentin-callstack 33d83b5
fix: support Expo 56 template in beta app generation
valentin-callstack 061e1fa
fix: install Android NDK required by Expo beta CI
valentin-callstack 19cc836
fix: install Expo-required Android NDK in CI
valentin-callstack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,186 @@ | ||
| name: Expo beta road test | ||
| run-name: Expo beta road test | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 */2 * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| issues: write | ||
|
|
||
| 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: Generate and apply Expo beta to ExpoAppBeta | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "${{ needs.prepare.outputs.latest_version }}" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Install Expo beta dependencies | ||
| run: | | ||
| cd apps/ExpoAppBeta | ||
| npx expo install --fix | ||
|
|
||
| - name: Run ExpoAppBeta -> AndroidApp road test | ||
| uses: ./.github/actions/androidapp-road-test | ||
| with: | ||
| flavor: expobeta | ||
| rn-project-path: apps/ExpoAppBeta | ||
| rn-project-maven-path: com/callstack/rnbrownfield/demo/expobeta/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: Generate and apply Expo beta to ExpoAppBeta | ||
| run: node --experimental-strip-types --no-warnings ./scripts/check-expo-beta.ts --expo-version "${{ needs.prepare.outputs.latest_version }}" --apply --github-step-summary "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Install Expo beta dependencies | ||
| run: | | ||
| cd apps/ExpoAppBeta | ||
| npx expo install --fix | ||
|
|
||
| - name: Run ExpoAppBeta -> AppleApp road test | ||
| uses: ./.github/actions/appleapp-road-test | ||
| with: | ||
| variant: expobeta | ||
| rn-project-path: apps/ExpoAppBeta | ||
|
|
||
| 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 | ||
|
|
||
| create-issue-on-failure: | ||
| name: Create issue on Expo beta failure | ||
| runs-on: ubuntu-latest | ||
| needs: [prepare, android, ios] | ||
| if: | | ||
| needs.prepare.outputs.should_test == 'true' && | ||
| (needs.android.result == 'failure' || needs.ios.result == 'failure') | ||
| steps: | ||
| - name: Create or reuse GitHub issue | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| issue_title="Expo beta road test failed for ${{ needs.prepare.outputs.latest_version }}" | ||
| existing_issue_number=$(gh issue list \ | ||
| --search "${issue_title} in:title state:open" \ | ||
| --json number \ | ||
| --jq '.[0].number // ""') | ||
|
|
||
| if [ -n "$existing_issue_number" ]; then | ||
| gh issue comment "$existing_issue_number" --body $'A new failure was detected.\n\n- Expo beta version: `${{ needs.prepare.outputs.latest_version }}`\n- Android result: `${{ needs.android.result }}`\n- iOS result: `${{ needs.ios.result }}`\n- Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' | ||
| exit 0 | ||
| fi | ||
|
|
||
| gh issue create \ | ||
| --title "$issue_title" \ | ||
| --body $'The Expo beta road test failed.\n\n- Expo beta version: `${{ needs.prepare.outputs.latest_version }}`\n- Android result: `${{ needs.android.result }}`\n- iOS result: `${{ needs.ios.result }}`\n- Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' \ | ||
| --label question | ||
|
|
||
| summarize: | ||
| name: Summarize Expo beta road test | ||
| runs-on: ubuntu-latest | ||
| needs: [prepare, android, ios, record-success, create-issue-on-failure] | ||
| 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' }}" | ||
| echo "- Issue created/updated on failure: ${{ needs.create-issue-on-failure.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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.