-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (63 loc) · 1.85 KB
/
check-pr.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
name: Check PR
on:
pull_request:
branches: ["main"]
paths-ignore:
- "docs/**"
- "art/**"
- "*.md"
concurrency:
group: pull_request-${{ github.ref }}
cancel-in-progress: true
jobs:
spotless:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Apply spotless rules
run: ./gradlew spotlessApply
- name: Commit newly formatted files
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "**/*.kt **/*.gradle.kts **/*.yml"
build:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
job: [ test ]
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
if: matrix.os == 'ubuntu-latest' && matrix.job == 'test'
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup gradle
uses: gradle/actions/setup-gradle@v3
# macos-latest
- name: Run tests on macos
if: matrix.os == 'macos-latest' && matrix.job == 'test'
run: ./gradlew iosX64Test
# ubuntu-latest
- name: Run tests on linux
if: matrix.os == 'ubuntu-latest' && matrix.job == 'test'
run: |
./gradlew testDebugUnitTest desktopTest wasmJsTest