forked from instaclustr/kafka-ldap-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.33 KB
/
sonarcloud.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
---
name: SonarCloud analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
pull-requests: read
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/[email protected]
with:
java-version-file: .java-version
distribution: 'temurin'
- name: Cache SonarCloud packages
uses: actions/[email protected]
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew build jacocoTestReport --info
- name: Set up JDK
uses: actions/[email protected]
with:
java-version-file: .java-version
distribution: 'temurin'
- name: Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube --info