-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 2.01 KB
/
e2e-android-maestro.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 🔗 Links:
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/workflows/e2e-android.yml
# End-to-end testing: https://starter.obytes.com/testing/end-to-end-testing/
# ✍️ Description:
# This workflow is used to run end-to-end tests on Android using Maestro Cloud.
# As a first step, it will generate a test APK using the Gradle build and then trigger Maestro Cloud to run the tests on the generated APK.
# This workflow will be triggered on pull requests (PRs) with the label "android-test-maestro-cloud" or can be manually triggered from the Actions tab.
# 🚨 GITHUB SECRETS REQUIRED:
# MAESTRO_CLOUD_API_KEY: API key for Maestro Cloud. You can get it from https://cloud.mobile.dev/ci-integration/github-actions#add-your-api-key-secret
name: E2E Tests Android (Maestro Cloud)
on:
workflow_dispatch:
pull_request:
branches: [main, master]
jobs:
generate-and-test-apk:
if: github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'android-test-maestro-cloud'))
name: Generate and Test Test APK (Maestro Cloud)
runs-on: ubuntu-latest
steps:
- name: 📦 Checkout project repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📦 Setup Node + PNPM + install deps
uses: ./.github/actions/setup-node-pnpm-install
- name: 📦 Set Up JDK + Generate Test APK
uses: ./.github/actions/setup-jdk-generate-apk
with:
APP_ENV: staging
- name: Upload Test APK
uses: actions/upload-artifact@v3
with:
name: test-apk
path: ./android/app/build/outputs/apk/release/app-release.apk
- name: 📱 Run E2E Tests with Maestro Cloud
uses: mobile-dev-inc/[email protected]
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: ./android/app/build/outputs/apk/release/app-release.apk
env: |
APP_ID=com.obytes.staging