-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (71 loc) · 2.48 KB
/
firebase_test_lab.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Firebase Test Lab
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# 1 Generate APKs so that we can install on Firebase Test Lab devices
apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
# 1
- uses: actions/[email protected]
- name: set up JDK 1.8
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '11'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Update Username from Secrets
env:
MOCK_USERNAME: ${{ secrets.TELNYX_SIP_USER }}
run: echo MOCK_USERNAME="$MOCK_USERNAME" > ./local.properties
- name: Add new line
run: echo -e "\n" >> ./local.properties
- name: Update Password from Secrets
env:
MOCK_PASSWORD: ${{ secrets.TELNYX_SIP_PASSWORD }}
run: echo MOCK_PASSWORD="$MOCK_PASSWORD" >> ./local.properties
- name: Clean
run: ./gradlew clean
- name: Assemble app debug APK
run: bash ./gradlew assembleDebug --stacktrace
- name: Upload app APK
uses: actions/[email protected]
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
- name: Assemble Android Instrumentation Tests
run: bash ./gradlew assembleDebugAndroidTest
- name: Upload Android Test APK
uses: actions/[email protected]
with:
name: app-debug-androidTest
path: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
firebase:
name: Run UI tests with Firebase Test Lab
needs: apk
runs-on: ubuntu-18.04
steps:
- name: Download app APK
uses: actions/[email protected]
with:
name: app-debug
- name: Download Android test APK
uses: actions/[email protected]
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.GCLOUD_AUTH }}
- 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 version=28,orientation=portrait