Skip to content

Run Device Tests

Run Device Tests #58

Workflow file for this run

name: Run Device Tests
# Run device tests using Firebase Test Lab
#
# This action is separated so that it can run on PRs coming from forks, without
# giving those forks access to our repository secrets, which are necessary to run against Firebase.
# There is also additional configuration so this workflow can be reused in our main workflow and block
# deployments on UI test results.
on:
workflow_run:
workflows: ["Build & Test Project"]
branches-ignore: [main]
types:
- completed
workflow_call:
jobs:
device-tests:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run' }}
steps:
- uses: haya14busa/action-workflow_run-status@v1
if: ${{ github.event_name == 'workflow_run' }}
- name: Set RUN_ID
run: echo "RUN_ID=${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
run-id: ${{ env.RUN_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Decode Firebase Service Account JSON
run: echo ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE_64 }} | base64 -d > service_account.json
- name: 'Run Device Tests on Firebase Test Lab'
run: |
gcloud auth login --cred-file=service_account.json
gcloud config set project vocable-fcb07
gcloud firebase test android run \
--app apk/debug/app-debug.apk \
--test apk/androidTest/debug/app-debug-androidTest.apk \
--device version=34,orientation=portrait,model=MediumPhone.arm,locale=en_US \
--test-runner-class com.willowtree.vocable.utility.VocableTestRunner