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 12
12
env :
13
13
OSS_USERNAME : ${{ secrets.OSS_USERNAME }}
14
14
OSS_PASSWORD : ${{ secrets.OSS_PASSWORD }}
15
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
15
16
16
17
jobs :
17
18
build :
40
41
restore-keys : |
41
42
${{ runner.os }}-maven-
42
43
- 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##*/}
44
49
- name : Release Snapshot
45
50
if : matrix.java_version == '11'
46
51
run : ./mvnw -V -B -ntp -ff deploy
Original file line number Diff line number Diff line change 306
306
<version >1.6.8</version >
307
307
<extensions >true</extensions >
308
308
</plugin >
309
+ <plugin >
310
+ <groupId >org.jacoco</groupId >
311
+ <artifactId >jacoco-maven-plugin</artifactId >
312
+ <version >0.8.6</version >
313
+ </plugin >
309
314
</plugins >
310
315
</pluginManagement >
311
316
<plugins >
347
352
</execution >
348
353
</executions >
349
354
</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 >
350
400
</plugins >
351
401
</build >
352
402
</project >
You can’t perform that action at this time.
0 commit comments