This repository was archived by the owner on Apr 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Sonar
2
+
3
+ env :
4
+ MAVEN_ARGS : -V -ntp -e
5
+
6
+ concurrency :
7
+ group : ${{ github.ref }}-${{ github.workflow }}
8
+ cancel-in-progress : true
9
+ on :
10
+ push :
11
+ branches : [ main ]
12
+ pull_request :
13
+ types : [ opened, synchronize, reopened ]
14
+
15
+ jobs :
16
+ test :
17
+ runs-on : ubuntu-latest
18
+ if : ${{ ( github.event_name == 'push' || github.event_name == 'pull_request' ) }}
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Set up Java and Maven
22
+ uses : actions/setup-java@v3
23
+ with :
24
+ distribution : temurin
25
+ java-version : 17
26
+ cache : ' maven'
27
+ - name : Cache SonarCloud packages
28
+ uses : actions/cache@v3
29
+ with :
30
+ path : ~/.sonar/cache
31
+ key : ${{ runner.os }}-sonar
32
+ restore-keys : ${{ runner.os }}-sonar
33
+ - name : Build and analyze
34
+ env :
35
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
36
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
37
+ run : mvn -B org.jacoco:jacoco-maven-plugin:prepare-agent verify org.jacoco:jacoco-maven-plugin:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=java-operator-sdk_jenvtest
38
+
Original file line number Diff line number Diff line change 57
57
<kubernetes .webhooks.framework.version>1.0.0</kubernetes .webhooks.framework.version>
58
58
<nexus-staging-maven-plugin .version>1.6.13</nexus-staging-maven-plugin .version>
59
59
<maven-javadoc-plugin .version>3.5.0</maven-javadoc-plugin .version>
60
+ <sonar .organization>java-operator-sdk</sonar .organization>
61
+ <sonar .host.url>https://sonarcloud.io</sonar .host.url>
60
62
</properties >
61
63
62
64
<modules >
You can’t perform that action at this time.
0 commit comments