Skip to content

Commit

Permalink
sonar add coverage with jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
MichiBaum committed Oct 8, 2024
1 parent e9a1dea commit 2e31b4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn clean compile -DdockerHub.username=${{secrets.DOCKERHUB_USERNAME}} -DdockerHub.password=${{secrets.DOCKERHUB_PASSWORD}} -DdockerHub.publish=false
mvn clean verify -DdockerHub.username=${{secrets.DOCKERHUB_USERNAME}} -DdockerHub.password=${{secrets.DOCKERHUB_PASSWORD}} -DdockerHub.publish=false
mvn sonar:sonar -Dsonar.projectKey=MichiBaum_Microservices -Pcoverage
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<!-- Sonarqube -->
<sonar.organization>michibaum</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.language>kotlin</sonar.language>
</properties>

<dependencies>
Expand Down Expand Up @@ -193,6 +196,7 @@
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
Expand Down

0 comments on commit 2e31b4b

Please sign in to comment.