-
-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (38 loc) · 1015 Bytes
/
CI.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
permissions:
contents: write
security-events: write
env:
GRADLE_OPTS: -Dorg.gradle.caching=true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
dependency-graph: generate-and-submit
gradle-home-cache-cleanup: true
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-kotlin-1.9.0
path:
~/.konan
- name: Build with Gradle
run: ./gradlew build
- name: Detekt
run: ./gradlew detekt
- name: Upload SARIF to Github using the upload-sarif action
uses: github/codeql-action/upload-sarif@v2
if: success() || failure()
with:
sarif_file: build/reports/detekt/detekt.sarif