File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarCloud
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+ - main
8+ pull_request :
9+ types : [opened, synchronize, reopened]
10+
11+ jobs :
12+ build :
13+ name : SonarCloud Analysis
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Set up JDK
21+ uses : actions/setup-java@v4
22+ with :
23+ distribution : ' temurin'
24+ java-version : ' 21'
25+
26+ - name : Cache Sonar packages
27+ uses : actions/cache@v4
28+ with :
29+ path : ~/.sonar/cache
30+ key : ${{ runner.os }}-sonar
31+ restore-keys : ${{ runner.os }}-sonar
32+
33+ - name : Cache Maven packages
34+ uses : actions/cache@v4
35+ with :
36+ path : |
37+ ~/.m2/repository
38+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
39+ restore-keys : ${{ runner.os }}-maven
40+
41+ - name : SonarCloud Scan
42+ run : |
43+ mvn verify sonar:sonar -DskipTests \
44+ -Dsonar.projectKey=felipemelozx_TrackMoney \
45+ -Dsonar.organization=felipemelozx-trackmoney \
46+ -Dsonar.host.url=https://sonarcloud.io \
47+ -Dsonar.login=${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change 8484 <groupId >org.springframework.boot</groupId >
8585 <artifactId >spring-boot-maven-plugin</artifactId >
8686 </plugin >
87+ <plugin >
88+ <groupId >org.sonarsource.scanner.maven</groupId >
89+ <artifactId >sonar-maven-plugin</artifactId >
90+ <version >3.9.1.2184</version >
91+ </plugin >
8792 <!-- <plugin>
8893 <groupId>org.apache.maven.plugins</groupId>
8994 <artifactId>maven-checkstyle-plugin</artifactId>
You can’t perform that action at this time.
0 commit comments