-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (69 loc) · 2.01 KB
/
ci.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
name: CI - build, tests, lint
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
branches: [ master ]
jobs:
build_job:
name: Build (Unit-tests & Android-Lint)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '17'
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build
- name: Archive output artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: output-artifacts
path: |
app/build/outputs
app/build/reports
android_ui_test_job:
name: Android UI-tests on emulator
needs: build_job
runs-on: macos-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
api-level: [16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '17'
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run debug UI-tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
script: ./gradlew :app:connectedCheck -PtestBuildType=debug
- name: Run release UI-tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
script: ./gradlew :app:connectedCheck -PtestBuildType=release