forked from akexorcist/Localization
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (77 loc) · 2.62 KB
/
Copy pathandroid.yml
File metadata and controls
92 lines (77 loc) · 2.62 KB
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
91
92
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Unit test
run: ./gradlew test
apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Assemble App APK
run: ./gradlew assembleDebug
- name: Upload App APK
uses: actions/upload-artifact@v1
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
- name: Assemble Android Instrumented Unit Test
run: ./gradlew assembleDebugAndroidTest
- name: Upload Android Test APK
uses: actions/upload-artifact@v1
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:
- 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=flame,version=30,locale=en,orientation=portrait
--device model=crownlte,version=28,locale=en,orientation=portrait
--device model=OnePlus3T,version=26,locale=en,orientation=portrait
--device model=HWMHA,version=24,locale=en,orientation=portrait
--device model=grandppltedx,version=23,locale=en,orientation=portrait
--device model=Nexus5,version=21,locale=en,orientation=portrait"