File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed
Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 1212env :
1313 OSS_USERNAME : ${{ secrets.OSS_USERNAME }}
1414 OSS_PASSWORD : ${{ secrets.OSS_PASSWORD }}
15+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
1516
1617jobs :
1718 build :
4041 restore-keys : |
4142 ${{ runner.os }}-maven-
4243 - name : Run tests
43- run : ./mvnw -V -B -ntp -ff verify
44+ run : ./mvnw -V -B -ntp -ff verify jacoco:report
45+ - name : Static Analysis (Sonar)
46+ # Sonar will require at least Java 11 soon.
47+ if : matrix.java_version == '11'
48+ run : ./mvnw -B -ntp -ff jacoco:report-aggregate org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=OpenAPITools_openapi-diff -Dsonar.organization=openapitools -Dsonar.host.url=https://sonarcloud.io -Dsonar.branch.name=${GITHUB_REF##*/}
4449 - name : Release Snapshot
4550 if : matrix.java_version == '11'
4651 run : ./mvnw -V -B -ntp -ff deploy
Original file line number Diff line number Diff line change 306306 <version >1.6.8</version >
307307 <extensions >true</extensions >
308308 </plugin >
309+ <plugin >
310+ <groupId >org.jacoco</groupId >
311+ <artifactId >jacoco-maven-plugin</artifactId >
312+ <version >0.8.6</version >
313+ </plugin >
309314 </plugins >
310315 </pluginManagement >
311316 <plugins >
347352 </execution >
348353 </executions >
349354 </plugin >
355+ <plugin >
356+ <groupId >org.jacoco</groupId >
357+ <artifactId >jacoco-maven-plugin</artifactId >
358+ <executions >
359+ <execution >
360+ <id >jacoco-initialize</id >
361+ <goals >
362+ <goal >prepare-agent</goal >
363+ </goals >
364+ </execution >
365+ <execution >
366+ <id >jacoco-site</id >
367+ <phase >test</phase >
368+ <goals >
369+ <goal >report</goal >
370+ </goals >
371+ </execution >
372+ <execution >
373+ <id >default-check</id >
374+ <goals >
375+ <goal >check</goal >
376+ </goals >
377+ <configuration >
378+ <rules >
379+ <rule >
380+ <element >PACKAGE</element >
381+ <limits >
382+ <limit >
383+ <counter >LINE</counter >
384+ <value >COVEREDRATIO</value >
385+ <minimum >0</minimum >
386+ </limit >
387+ </limits >
388+ </rule >
389+ </rules >
390+ </configuration >
391+ </execution >
392+ </executions >
393+ <configuration >
394+ <excludes >
395+ <!-- Example: -->
396+ <!-- <exclude>**/gradle-wrapper.jar</exclude> -->
397+ </excludes >
398+ </configuration >
399+ </plugin >
350400 </plugins >
351401 </build >
352402</project >
You can’t perform that action at this time.
0 commit comments