From 69a997e46db16cc8f3d87a1201ed80b8562e61e0 Mon Sep 17 00:00:00 2001 From: "shantanu.tiwari" Date: Tue, 22 Oct 2024 13:33:46 +0530 Subject: [PATCH] Sonar coverage fix --- .github/workflows/sonarcloud-checks.yml | 2 ++ pom.xml | 46 ++++++++++++++++++++----- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sonarcloud-checks.yml b/.github/workflows/sonarcloud-checks.yml index 22689fd..f91b4ec 100644 --- a/.github/workflows/sonarcloud-checks.yml +++ b/.github/workflows/sonarcloud-checks.yml @@ -32,6 +32,8 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Build and analyze env: + USER_NAME: ${{ secrets.PPE_USER_NAME }} + ACCESS_TOKEN: ${{ secrets.PPE_ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=PhonePe_DLM diff --git a/pom.xml b/pom.xml index 02f2830..6a8aa2c 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,7 @@ 0.5.0 2.5.3 1.6 + 3.9.1.2184 4.3.1 @@ -97,15 +98,22 @@ 17 17 + PhonePe_DLM phonepe https://sonarcloud.io - - - - **/src/test/com/phonepe/dlm/**/*.java, - **/src/test/com/phonepe/dlm/*.java - + src/main + src/test + jacoco + reuseReports + java + true + true + + + + + @@ -275,25 +283,47 @@ deploy + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${maven.sonar.plugin.version} + + + sonar-run + verify + + sonar + + + + org.jacoco jacoco-maven-plugin ${jacoco.maven.plugin.version} - prepare-agent + initialize prepare-agent + + true + report - test + prepare-package report + + + + +