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