Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Last active April 5, 2021 07:49
Show Gist options
  • Save akexorcist/833bc471dd087badff48d0703825dc64 to your computer and use it in GitHub Desktop.
Save akexorcist/833bc471dd087badff48d0703825dc64 to your computer and use it in GitHub Desktop.
Android CI Workflow for GitHub Actions - Run UI Test on Firebase Test Lab
# ...
jobs:
test:
# ...
apk:
# ...
firebase:
name: Run UI tests with Firebase Test Lab
needs: apk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Download app APK
uses: actions/download-artifact@v1
with:
name: app-debug
- name: Download Android test APK
uses: actions/download-artifact@v1
with:
name: app-debug-androidTest
- name: Login to Google Cloud
uses: google-github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_key: ${{ secrets.FIREBASE_SERVICES_KEY }}
- name: Set current project
run: "gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID }}"
- name: Run Instrumentation Tests in Firebase Test Lab
run: "gcloud firebase test android run
--type instrumentation
--app app-debug/app-debug.apk
--test app-debug-androidTest/app-debug-androidTest.apk
--device model=Pixel2,version=30,locale=en,orientation=portrait"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment