Skip to content

Commit 189bb44

Browse files
cortinicometa-codesync[bot]
authored andcommitted
Add Maestro Cloud CI for RNTester (#57919)
Summary: This integrates our CI to work with Maestro Cloud. The change is additive as the previous existing tests are untouched (also because the Debug Maestro tests require a running bundler which we can't have on Maestro Cloud). ## Changelog: [INTERNAL] - Pull Request resolved: #57919 Test Plan: CI Reviewed By: christophpurrer Differential Revision: D115732295 Pulled By: cortinico fbshipit-source-id: 20a5feb21ec130ba227655f415214f91548f2423
1 parent f4803df commit 189bb44

1 file changed

Lines changed: 97 additions & 1 deletion

File tree

.github/workflows/test-all.yml

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ jobs:
8888
debugger_shell:
8989
- 'packages/debugger-shell/**'
9090
- 'scripts/debugger-shell/**'
91-
9291
prebuild_apple_dependencies:
9392
needs: check_code_changes
9493
if: |
@@ -163,6 +162,55 @@ jobs:
163162
use-prebuilds: true
164163
flavor: ${{ matrix.flavor }}
165164

165+
test_maestro_cloud_ios:
166+
name: Maestro Cloud iOS RNTester
167+
needs: test_ios_rntester
168+
if: |
169+
needs.test_ios_rntester.result == 'success' &&
170+
(
171+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
172+
(
173+
github.event_name == 'pull_request' &&
174+
github.event.pull_request.head.repo.full_name == github.repository &&
175+
github.actor != 'dependabot[bot]'
176+
)
177+
)
178+
runs-on: ubuntu-latest
179+
timeout-minutes: 75
180+
steps:
181+
- name: Checkout
182+
uses: actions/checkout@v6
183+
with:
184+
persist-credentials: false
185+
- name: Download RNTester app
186+
uses: actions/download-artifact@v7
187+
with:
188+
name: RNTesterApp-NewArch-Release
189+
path: /tmp/RNTesterBuild/RNTester.app
190+
- name: Validate Maestro Cloud inputs
191+
env:
192+
MAESTRO_CLOUD_API_KEY: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
193+
MAESTRO_CLOUD_PROJECT_ID: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
194+
run: |
195+
test -n "$MAESTRO_CLOUD_API_KEY"
196+
test -n "$MAESTRO_CLOUD_PROJECT_ID"
197+
test -d /tmp/RNTesterBuild/RNTester.app
198+
test -z "$(find packages/rn-tester/.maestro -type l -print -quit)"
199+
- name: Run flows on Maestro Cloud
200+
uses: mobile-dev-inc/action-maestro-cloud@5759506b4ec7ee0a1ece4b7e6574bba2b282f241 # v3.0.1
201+
with:
202+
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
203+
project-id: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
204+
app-file: /tmp/RNTesterBuild/RNTester.app
205+
workspace: packages/rn-tester/.maestro
206+
branch: ${{ github.head_ref || github.ref_name }}
207+
name: RNTester iOS - ${{ github.event.pull_request.title || github.event.head_commit.message }}
208+
exclude-tags: android-only
209+
env: |
210+
APP_ID=com.meta.RNTester.localDevelopment
211+
maestro-cli-version: 2.6.1
212+
timeout: 60
213+
166214
test_e2e_ios_rntester:
167215
needs: test_ios_rntester
168216
if: ${{ needs.test_ios_rntester.result == 'success' }}
@@ -326,6 +374,54 @@ jobs:
326374
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
327375
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
328376

377+
test_maestro_cloud_android:
378+
name: Maestro Cloud Android RNTester
379+
needs: build_android
380+
if: |
381+
needs.build_android.result == 'success' &&
382+
(
383+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
384+
(
385+
github.event_name == 'pull_request' &&
386+
github.event.pull_request.head.repo.full_name == github.repository &&
387+
github.actor != 'dependabot[bot]'
388+
)
389+
)
390+
runs-on: ubuntu-latest
391+
timeout-minutes: 75
392+
steps:
393+
- name: Checkout
394+
uses: actions/checkout@v6
395+
with:
396+
persist-credentials: false
397+
- name: Download RNTester APK
398+
uses: actions/download-artifact@v7
399+
with:
400+
name: rntester-release
401+
path: /tmp/rntester-android
402+
- name: Validate Maestro Cloud inputs
403+
env:
404+
MAESTRO_CLOUD_API_KEY: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
405+
MAESTRO_CLOUD_PROJECT_ID: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
406+
run: |
407+
test -n "$MAESTRO_CLOUD_API_KEY"
408+
test -n "$MAESTRO_CLOUD_PROJECT_ID"
409+
test -f /tmp/rntester-android/app-x86-release.apk
410+
test -z "$(find packages/rn-tester/.maestro -type l -print -quit)"
411+
- name: Run flows on Maestro Cloud
412+
uses: mobile-dev-inc/action-maestro-cloud@5759506b4ec7ee0a1ece4b7e6574bba2b282f241 # v3.0.1
413+
with:
414+
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
415+
project-id: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
416+
app-file: /tmp/rntester-android/app-x86-release.apk
417+
workspace: packages/rn-tester/.maestro
418+
branch: ${{ github.head_ref || github.ref_name }}
419+
name: RNTester Android - ${{ github.event.pull_request.title || github.event.head_commit.message }}
420+
env: |
421+
APP_ID=com.facebook.react.uiapp
422+
maestro-cli-version: 2.6.1
423+
timeout: 60
424+
329425
test_e2e_android_rntester:
330426
needs: build_android
331427
if: ${{ needs.build_android.result == 'success' }}

0 commit comments

Comments
 (0)