From 755ee09f4a1872a79655ff77f147a8a556d4d829 Mon Sep 17 00:00:00 2001 From: Marinov Avgustin Date: Mon, 7 Oct 2024 11:47:31 +0300 Subject: [PATCH] Add sonar scan Signed-off-by: Marinov Avgustin --- .github/workflows/verify.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 098e555e8e..332c9b0a27 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} services: rabbitmq: @@ -33,12 +35,16 @@ jobs: java-version: 17 cache: 'maven' + - name: Test sonar access Scan (Sonar) + run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=eclipse-master -Dsonar.login=$SONARCLOUD_TOKEN --batch-mode + - name: Check file license headers run: mvn license:check --batch-mode - - - name: Run tests & javadoc - run: mvn verify javadoc:javadoc --batch-mode # -# - name: Scan (Sonar) +# - name: Run tests & javadoc +# if: ${{ BRANCH_NAME != 'master' }} +# run: mvn verify javadoc:javadoc --batch-mode + + - name: Run tests & javadoc & Scan (Sonar) # if: ${{ BRANCH_NAME == 'master' }} -# run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=eclipse-master -Dsonar.login=$SONAR_ACCESS_TOKEN --batch-mode + run: mvn verify javadoc:javadoc org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=bir-eclipse-hawkbit --batch-mode