From 4fe73d61a45b6a609958cfa30dcd267d31252125 Mon Sep 17 00:00:00 2001 From: vibhutikumar <160819926+vibhutikumar07@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:41:36 +0530 Subject: [PATCH] Update sonarqube.yml --- .github/workflows/sonarqube.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 44c8438..e1a44ba 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -24,7 +24,7 @@ # Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/) # or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10) -name: Build +name: SonarQube analysis on: push: @@ -41,13 +41,20 @@ permissions: jobs: build: - name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - uses: sonarsource/sonarqube-scan-action@master + + - name: npm install and test + run: | + npm install + npm run test + + - name: Analyze with SonarQube + uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}