File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Java CI + SonarCloud
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+ - develop
9+ pull_request :
10+ types : [synchronize, opened, reopened]
11+
12+ jobs :
13+ sonar-cloud :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up JDK 8
22+ uses : actions/setup-java@v4
23+ with :
24+ java-version : ' 8'
25+ distribution : ' temurin'
26+
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+
34+ - name : Build with Maven
35+ run : mvn clean install -P no-gpg --no-transfer-progress
36+
37+ - name : Run SonarCloud Analysis
38+ uses : SonarSource/sonarqube-scan-action@master
39+ with :
40+ projectBaseDir : .
41+ env :
42+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 221221 </execution >
222222 </executions >
223223 </plugin >
224-
224+
225225 <plugin >
226226 <groupId >org.jacoco</groupId >
227227 <artifactId >jacoco-maven-plugin</artifactId >
228- <version >0.8.2 </version >
228+ <version >0.8.11 </version >
229229 <executions >
230230 <execution >
231+ <id >prepare-agent</id >
231232 <goals >
232233 <goal >prepare-agent</goal >
233234 </goals >
234235 </execution >
235236 <execution >
236237 <id >jacoco-report</id >
237- <phase >test </phase >
238+ <phase >verify </phase >
238239 <goals >
239240 <goal >report</goal >
240241 </goals >
241242 </execution >
242- <!-- Add this checking -->
243- <execution >
244- <id >jacoco-check</id >
245- <goals >
246- <goal >check</goal >
247- </goals >
248- <configuration >
249- <rules >
250- <rule >
251- <element >PACKAGE</element >
252- <limits >
253- <limit >
254- <counter >LINE</counter >
255- <value >COVEREDRATIO</value >
256- <minimum >0.0</minimum >
257- </limit >
258- </limits >
259- </rule >
260- </rules >
261- </configuration >
262- </execution >
263-
264243 </executions >
265244 </plugin >
245+
266246 </plugins >
267247 </build >
268248
269249 <profiles >
250+ <profile >
251+ <id >no-gpg</id >
252+ <activation >
253+ <property >
254+ <name >skipGpg</name >
255+ <value >true</value >
256+ </property >
257+ </activation >
258+ <build >
259+ <plugins >
260+ <plugin >
261+ <groupId >org.apache.maven.plugins</groupId >
262+ <artifactId >maven-gpg-plugin</artifactId >
263+ <executions >
264+ <execution >
265+ <id >sign-artifacts</id >
266+ <phase >none</phase >
267+ </execution >
268+ </executions >
269+ </plugin >
270+ </plugins >
271+ </build >
272+ </profile >
270273 <profile >
271274 <id >release</id >
272275 <build >
Original file line number Diff line number Diff line change 1+ sonar.organization =transbankdevelopers
2+ sonar.projectKey =TransbankDevelopers_transbank-sdk-java
3+ sonar.language =java
4+ sonar.projectVersion =1.0.0
5+ sonar.sourceEncoding =UTF-8
6+ sonar.sources =src/main/java
7+ sonar.tests =src/test/java
8+ sonar.java.binaries =target/classes
9+ sonar.coverage.jacoco.xmlReportPaths =target/site/jacoco/jacoco.xml
10+ sonar.exclusions =**/model/**,**/requests/**,**/responses/**
You can’t perform that action at this time.
0 commit comments