From 9270788386b358bd85fd36e65c34b23f8fc75a7f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 12 Aug 2023 12:58:10 -0700 Subject: [PATCH] Added Sonar JDK to worklow --- .github/workflows/bld.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index bdafdc9..ae94251 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -6,9 +6,12 @@ jobs: build-bld-project: runs-on: ubuntu-latest + env: + SONAR_JDK: "17" + strategy: matrix: - java-version: [ 17, 19, 20 ] + java-version: [ 17, 20 ] steps: - name: Checkout source repository @@ -33,15 +36,17 @@ jobs: - name: SonarCloud Scan uses: sonarsource/sonarcloud-github-action@master + if: success() && matrix.java-version == env.SONAR_JDK env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - args: > - -Dsonar.organization=ethauvin-github - -Dsonar.projectKey=my-ethauvin_HttpStatus - -Dsonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml - -Dsonar.jacoco.reportPath=build/jacoco/jacoco.exec - -Dsonar.sources=src/main/java/ - -Dsonar.tests=src/test/java/ - -Dsonar.verbose=true + with: + args: > + -Dsonar.organization=ethauvin-github + -Dsonar.projectKey=my-ethauvin_HttpStatus + -Dsonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml + -Dsonar.jacoco.reportPath=build/jacoco/jacoco.exec + -Dsonar.sources=src/main/java/ + -Dsonar.tests=src/test/java/ + -Dsonar.verbose=true