File tree 2 files changed +93
-3
lines changed
2 files changed +93
-3
lines changed Original file line number Diff line number Diff line change 60
60
- name : Last opp Jacoco enhetstester rapport
61
61
uses : actions/upload-artifact@v4
62
62
with :
63
- name : jacocoUT
64
- path : target/jacoco/UT/jacoco .xml
63
+ name : kover
64
+ path : target/site/kover/report .xml
65
65
retention-days : 1
66
- overwrite : true
66
+ overwrite : true
67
+
68
+ sonar :
69
+ if : github.actor != 'dependabot[bot]'
70
+ name : Sonar
71
+ runs-on : ubuntu-latest
72
+ needs : [ tester ]
73
+ steps :
74
+ - uses : actions/checkout@v4
75
+ with :
76
+ fetch-depth : 0
77
+ - uses : actions/setup-java@v4
78
+ with :
79
+ java-version : 21
80
+ distribution : ' temurin'
81
+ cache : ' maven'
82
+ - name : Last ned kover rapport
83
+ uses : actions/download-artifact@v4
84
+ with :
85
+ name : kover
86
+ path : kover/kover
87
+ - name : Cache Sonar packages
88
+ uses : actions/cache@v4
89
+ with :
90
+ path : ~/.sonar/cache
91
+ key : ${{ runner.os }}-sonar
92
+ restore-keys : ${{ runner.os }}-sonar
93
+ - name : Kjør Sonar
94
+ env :
95
+ GITHUB_USERNAME : x-access-token
96
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
98
+ run : |
99
+ mvn sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths="kover/kover/report.xml"
Original file line number Diff line number Diff line change 26
26
<felles .version>3.20250311182943_dac8027</felles .version>
27
27
<token-validation-spring .version>5.0.19</token-validation-spring .version>
28
28
<springdoc .version>2.8.5</springdoc .version>
29
+ <kover .version>0.9.1</kover .version>
30
+
31
+ <!-- Sonar -->
32
+ <sonar-maven-plugin .version>5.0.0.4389</sonar-maven-plugin .version>
33
+ <sonar .organization>navikt</sonar .organization>
34
+ <sonar .host.url>https://sonarcloud.io</sonar .host.url>
35
+ <sonar .sources>src/main</sonar .sources>
36
+ <sonar .tests>src/test</sonar .tests>
37
+ <sonar .projectKey>navikt_familie-ks-barnehagelister</sonar .projectKey>
29
38
</properties >
30
39
31
40
<dependencyManagement >
311
320
</execution >
312
321
</executions >
313
322
</plugin >
323
+ <plugin >
324
+ <groupId >org.jetbrains.kotlinx</groupId >
325
+ <artifactId >kover-maven-plugin</artifactId >
326
+ <version >${kover.version} </version >
327
+ <executions >
328
+ <execution >
329
+ <id >instr</id >
330
+ <goals >
331
+ <goal >instrumentation</goal >
332
+ </goals >
333
+ </execution >
334
+ <execution >
335
+ <id >kover-xml</id >
336
+ <goals >
337
+ <goal >report-xml</goal >
338
+ </goals >
339
+ </execution >
340
+ <execution >
341
+ <id >kover-log</id >
342
+ <goals >
343
+ <goal >log</goal >
344
+ </goals >
345
+ </execution >
346
+ <execution >
347
+ <id >kover-html</id >
348
+ <goals >
349
+ <goal >report-html</goal >
350
+ </goals >
351
+ </execution >
352
+ <execution >
353
+ <id >kover-verify</id >
354
+ <goals >
355
+ <goal >verify</goal >
356
+ </goals >
357
+ </execution >
358
+ <execution >
359
+ <id >kover-ic</id >
360
+ <goals >
361
+ <goal >report-ic</goal >
362
+ </goals >
363
+ </execution >
364
+ </executions >
365
+ </plugin >
366
+ <plugin >
367
+ <groupId >org.sonarsource.scanner.maven</groupId >
368
+ <artifactId >sonar-maven-plugin</artifactId >
369
+ <version >${sonar-maven-plugin.version} </version >
370
+ </plugin >
314
371
</plugins >
315
372
</build >
316
373
</project >
You can’t perform that action at this time.
0 commit comments