This repository was archived by the owner on Jun 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.7 KB
/
android-ci.yml
File metadata and controls
55 lines (46 loc) · 1.7 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
# This is a basic workflow to help you get started with Actions
name: Android CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
testing:
name: Run app module tests
runs-on: ubuntu-latest
env:
ORG_GRADLE_PROJECT_SERVER_BASE_URL: ${{ secrets.ORG_GRADLE_PROPERTIES_SERVER_BASE_URL }}
ORG_GRADLE_PROJECT_SERVER_HOST: ${{ secrets.ORG_GRADLE_PROPERTIES_SERVER_HOST }}
steps:
# Setup
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Copy gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Copy google-services.json
env:
FIREBASE_CONFIG: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $FIREBASE_CONFIG > app/google-services.json
# Unit tests
- name: Run Unit Tests
run: ./gradlew testDebugUnitTest
# Instrumented unit tests
- name: Assemble Debug APK
run: ./gradlew assembleDebug
- name: Assemble Debug AndroidTest APK
run: ./gradlew assembleDebugAndroidTest
- name: Run tests on Firebase Test Lab
uses: asadmansr/Firebase-Test-Lab-Action@v1.0
with:
arg-spec: '.github/test-lab-config.yml:android-pixel-4'
env:
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}