From eeb6ae3c845a3428ba5a903545596d84f3f8ee90 Mon Sep 17 00:00:00 2001 From: KevinOomenTheDeveloper <84910255+KevinOomenTheDeveloper@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:22:08 +0200 Subject: [PATCH] Update development-workflow.yml --- .github/workflows/development-workflow.yml | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/development-workflow.yml b/.github/workflows/development-workflow.yml index 5d30021..1596a29 100644 --- a/.github/workflows/development-workflow.yml +++ b/.github/workflows/development-workflow.yml @@ -60,11 +60,30 @@ jobs: run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js run: npm run build + + sonarcloud: + runs-on: ubuntu-latest + needs: build + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install SonarCloud Scanner + run: npm install -g sonarqube-scanner # Install SonarCloud Scanner globally + + - name: SonarCloud Scan + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sonarqube-scanner \ + -Dsonar.projectKey=SpotiCloud_frontend \ + -Dsonar.organization=spoticloud \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} - # Snyk security scan job snyk_scan: runs-on: ubuntu-latest - needs: build # Ensure the build job completes before running Snyk scan + needs: build steps: - name: Checkout code uses: actions/checkout@v2