-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathandroid.yml
68 lines (57 loc) · 1.97 KB
/
android.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
codesmell:
name: Code Smell (Detekt, CheckStyle, Lint)
uses: ./.github/workflows/launch_gradle_commands.yml
secrets:
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
with:
commands: lint detekt checkstyle
unitTest:
name: Unit Tests
uses: ./.github/workflows/launch_gradle_commands.yml
secrets:
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
with:
commands: testReleaseUnitTest
generateApks:
name: Generate APKs
uses: ./.github/workflows/launch_gradle_commands.yml
secrets:
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
with:
commands: assembleMockClientDebug assembleMockClientDebugAndroidTest
uploadArtifacts: true
uiTests:
name: UI Tests on Firebase Test Labs
needs: generateApks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download App Debug APK
id: app-debug-download
uses: actions/download-artifact@v2
with:
name: app-debug
- name: Download Android Test APK
id: android-test-download
uses: actions/download-artifact@v2
with:
name: android-test
- name: Login to Google Cloud
uses: google-github-actions/setup-gcloud@v0
with:
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
env:
APP_DEBUG_LOCATION: app-mock-client-debug.apk
ANDROID_TEST_LOCATION: app-mock-client-debug-androidTest.apk
DEVICE_MODEL: Nexus9,version=24,locale=en,orientation=landscape
run: gcloud firebase test android run --type instrumentation --app $APP_DEBUG_LOCATION --test $ANDROID_TEST_LOCATION --device model=$DEVICE_MODEL --use-orchestrator --num-flaky-test-attempts 2