diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 89fb05fe1c1c6f0a9aabe9a034320ee6789dc372..5c9a587ed97d0e5e44515f46d06125bc4fba745b 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -38,4 +38,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=safetypin-be-auth -Dsonar.projectName='safetypin-be-auth' \ No newline at end of file + run: mvn -B verify jacoco:check org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=safetypin-be-auth -Dsonar.projectName='safetypin-be-auth' \ No newline at end of file diff --git a/pom.xml b/pom.xml index d2df0f7967b240f33a42e94813a0de92915aa154..f816b9420d9bf5c711d030d924d570239aa92b3c 100644 --- a/pom.xml +++ b/pom.xml @@ -283,6 +283,26 @@ <goal>report</goal> </goals> </execution> + <execution> + <id>coverage-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <rules> + <rule> + <element>PACKAGE</element> + <limits> + <limit> + <counter>LINE</counter> + <value>COVEREDRATIO</value> + <minimum>1.00</minimum> + </limit> + </limits> + </rule> + </rules> + </configuration> + </execution> </executions> </plugin> </plugins>