Skip to content

Commit

Permalink
update workflows for Android and use gcloud beta
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-chaix-didomi committed Aug 12, 2024
1 parent 458f670 commit d9544af
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

- name: Build Android App
run: |
npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleDebug --no-daemon
- name: Upload Android App APK
Expand Down Expand Up @@ -113,15 +113,18 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
install_components: 'beta'

- name: Run Instrumentation Tests in Firebase Test Lab
run: |
gcloud firebase test android run --type instrumentation \
--app android/app/build/outputs/apk/debug/app-debug.apk \
--test android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
gcloud beta firebase test android run \
--type=instrumentation \
--app=android/app/build/outputs/apk/debug/app-debug.apk \
--test=android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--use-orchestrator \
--device model=MediumPhone.arm,version=33,locale=en,orientation=portrait \
--num-flaky-test-attempts=3
--device="model=MediumPhone.arm,version=34,locale=en,orientation=portrait" \
--num-flaky-test-attempts=3 \
--quiet
test_ios:
name: Testing iOS
Expand All @@ -134,6 +137,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -87,7 +93,7 @@ jobs:

- name: Build Android App
run: |
npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleDebug --no-daemon
- name: Upload Android App APK
Expand Down Expand Up @@ -116,15 +122,18 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
install_components: 'beta'

- name: Run Instrumentation Tests in Firebase Test Lab
run: |
gcloud firebase test android run --type instrumentation \
--app android/app/build/outputs/apk/debug/app-debug.apk \
--test android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
gcloud beta firebase test android run \
--type=instrumentation \
--app=android/app/build/outputs/apk/debug/app-debug.apk \
--test=android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--use-orchestrator \
--device model=MediumPhone.arm,version=33,locale=en,orientation=portrait \
--num-flaky-test-attempts=3
--device="model=MediumPhone.arm,version=34,locale=en,orientation=portrait" \
--num-flaky-test-attempts=3 \
--quiet
ios:
needs: js
Expand Down

0 comments on commit d9544af

Please sign in to comment.