-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.49 KB
/
test.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
name: Test
concurrency: # Cancel currently running tests when a new one is started
group: test-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches-ignore:
- 'build-**' # temporary build branch for kmmbridge
paths:
- 'androidApp/**'
- '!androidApp/version.properties'
- 'shared/**'
- 'buildSrc/**'
- 'gradle/**'
- 'build.gradle.kts'
- 'gradle.properties'
- 'settings.gradle.kts'
- '.github/workflows/test.yml'
jobs:
test:
runs-on: macos-latest # use mac so that shared iOS targets can also be built
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Cache kotlin native build tooling
uses: actions/cache@v4
with:
path: "~/.konan"
key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }}
- name: Test shared
run: ./gradlew shared:test --stacktrace
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"
- name: Test android
run: ./gradlew androidApp:test --stacktrace
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"