-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.56 KB
/
detekt.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
name: 'Detekt'
on:
pull_request:
push:
branches:
- 'master'
env:
GRADLE_OPTS: -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.welcome=never
jobs:
detekt:
name: 'Detekt'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch Git tags, so that semantic version can be calculated.
# Alternatively, run `git fetch --prune --unshallow --tags` as the
# next step, see
# https://github.com/actions/checkout/issues/206#issuecomment-607496604.
fetch-depth: 0
- name: 'Set up Java 17'
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
java-package: jdk+fx
- name: 'Cache ~/.konan'
id: cache-konan
uses: actions/cache@v3
with:
path: |
~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts', '**/gradle-wrapper.properties') }}-detekt
restore-keys: |
${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts', '**/gradle-wrapper.properties') }}-
${{ runner.os }}-konan-
- name: 'Execute Gradle build'
uses: gradle/gradle-build-action@v2.10.0
with:
gradle-version: wrapper
arguments: |
--continue
detektAll
- name: 'Publish SARIF to GitHub'
id: publish
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: build/detekt-sarif-reports/detekt-merged.sarif