-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 1.88 KB
/
code-quality.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
name: Code Quality
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
file-changes:
runs-on: ubuntu-latest
outputs:
any: ${{ steps.check.outputs.any_changed }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
submodules: 'recursive'
fetch-depth: 0
- name: Get changed files
id: check
uses: tj-actions/changed-files@v42
with:
files: |
.github/workflows/code-quality.yml
gradle/libs.versions.toml
gradle/kotlin-js-store/**
**/*.kt
**/*.kts
spotless:
runs-on: ubuntu-latest
needs: [ file-changes ]
if: needs.file-changes.outputs.any == 'true'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}
- uses: gradle/gradle-build-action@v3
name: Check spotless/ktlint rules
with:
arguments: spotlessCheck
api-check:
runs-on: ubuntu-latest
needs: [ file-changes ]
if: needs.file-changes.outputs.any == 'true'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}
- uses: gradle/gradle-build-action@v3
name: Check public api compatibility
with:
arguments: apiCheck