-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (77 loc) · 2.44 KB
/
check.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
on:
pull_request:
push:
branches:
- master
name: Verify
jobs:
check-android:
runs-on: ubuntu-latest
name: Tests / Android
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- run: ./gradlew assembleDebug
- name: Enable KVM
# enable KVM for faster emulator
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run instrumentation tests
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 35
target: default
emulator-boot-timeout: 300
arch: x86_64
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew connectedAndroidTest
lint:
runs-on: ubuntu-latest
name: Linting
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- run: ./gradlew ktlintCheck
test:
strategy:
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{ matrix.os }}-latest
name: Tests / ${{ matrix.os == 'ubuntu' && 'Ubuntu' || matrix.os == 'windows' && 'Windows' || matrix.os == 'macos' && 'macOs' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 21
- run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v4
- name: Run tests
run: ./gradlew allTests
publication:
strategy:
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
name: Publishing / ${{ matrix.os == 'ubuntu' && 'Ubuntu' || matrix.os == 'windows' && 'Windows' || matrix.os == 'macos' && 'macOs' }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- run: ./gradlew publishAllPublicationsToTestRepository --stacktrace