-
Notifications
You must be signed in to change notification settings - Fork 22
129 lines (106 loc) · 3.25 KB
/
android.yml
File metadata and controls
129 lines (106 loc) · 3.25 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- '*'
env:
CI: true
GRADLE_OPTS: -Dorg.gradle.daemon=false
TERM: dumb
jobs:
assemble:
name: Assemble
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Xmx4g
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.java') }}
- name: Assemble debug App apk
run: |
./gradlew app:assembleDebug
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Xmx4g
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.java') }}
- name: Run unit tests
run: |
./gradlew test -PslimTests
- name: Copy test results
if: always()
run: |
mkdir -p junit
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} junit/ \;
- name: Upload test results
if: always()
uses: actions/upload-artifact@v1
with:
name: junit-results
path: junit
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
env:
JAVA_TOOL_OPTIONS: -Xmx4g
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.java') }}
- name: Cleanup secrets
if: always()
run: |
rm -f app/src/prod/google-services.json
instrumented-tests:
name: Instrumented tests
runs-on: macos-10.15
timeout-minutes: 25
env:
JAVA_TOOL_OPTIONS: -Xmx4g
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.java') }}
- name: Run Android instrumented tests
uses: reactivecircus/android-emulator-runner@v2.20.0
with:
api-level: 28
arch: x86_64
profile: Nexus 5X
script: ./gradlew connectedCheck