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 939f6ae commit 6b2def4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn clean test -DdockerHub.username=${{secrets.DOCKERHUB_USERNAME}} -DdockerHub.password=${{secrets.DOCKERHUB_PASSWORD}} -DdockerHub.publish=false
mvn clean compile -DdockerHub.username=${{secrets.DOCKERHUB_USERNAME}} -DdockerHub.password=${{secrets.DOCKERHUB_PASSWORD}} -DdockerHub.publish=false
mvn integration-test test
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 @@ -224,9 +224,13 @@
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
<goal>report-aggregate</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
<dataFileIncludes>
<dataFileInclude>**/jacoco.exec</dataFileInclude>
</dataFileIncludes>
Expand Down

0 comments on commit 6b2def4

Please sign in to comment.