-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (53 loc) · 1.98 KB
/
pull_request_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
name: Check Pull Request
on:
pull_request:
branches:
- stable
- develop
paths:
- '**/*.kt'
- '**/*.kts'
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Set gradlew execution permission
run: chmod u+x gradlew
# https://github.com/marketplace/actions/gradle-build-action
- name: Build artifacts
uses: gradle/gradle-build-action@v2
with:
arguments: build --stacktrace
ktlint:
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/run-ktlint-with-reviewdog
- uses: ScaCap/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
ktlint_version: '1.0.1'
reporter: github-pr-review
fail_on_error: true
detekt:
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/run-detekt-with-reviewdog
- name: Run detekt with reviewdog
uses: alaegin/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
detekt_config: config/detekt/detekt.yml
detekt_build_upon_default_config: true
reporter: github-pr-review