-
Notifications
You must be signed in to change notification settings - Fork 11
89 lines (87 loc) · 2.91 KB
/
kmp.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Kotlin Multiplatform CI
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
build_job:
name: Build (Unit-tests & Android-Lint)
runs-on: macos-latest
continue-on-error: true
steps:
- name: Check out
uses: actions/checkout@v2
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Cached Konan
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: install cocoapods-generate
run: sudo gem install cocoapods-generate
- name: Build
run: ./gradlew build
- name: Archive build-output artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: output-build-artifacts
path: |
shared/build/reports
android-compose-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: [ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 ]
steps:
- name: Check out
uses: actions/checkout@v2
- name: Cached Konan
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Run UI-tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
script: ./gradlew :android-compose-app:connectedCheck
- name: Archive ui-tests-output artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: output-ui-tests-artifacts
path: |
android-compose-app/build/outputs
android-compose-app/build/reports