diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c592923467..43c706d2bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,23 +41,19 @@ jobs: id: run_tests_failure run: echo "test_output=false" >> $GITHUB_OUTPUT - # Triggering SonarQube analysis as results of it are required by Quality Gate check. - - name: SonarQube Scan - if: ${{ env.HAVE_SONAR_TOKEN == 'true' }} - uses: sonarsource/sonarqube-scan-action@master - env: - HAVE_SONAR_TOKEN: ${{ secrets.SONAR_TOKEN != '' }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - # Check the Quality Gate status. - - name: SonarQube Quality Gate check - id: sonarqube-quality-gate-check + sonar-scan: + name: SonarQube Scan + needs: go_test + runs-on: ubuntu-latest + steps: + - name: Checkout Branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan if: ${{ env.HAVE_SONAR_TOKEN == 'true' }} - uses: sonarsource/sonarqube-quality-gate-action@master - # Force to fail step after specific time. - timeout-minutes: 5 + uses: SonarSource/sonarcloud-github-action@master env: HAVE_SONAR_TOKEN: ${{ secrets.SONAR_TOKEN != '' }} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties index 5565a9e4d4..1d33424c73 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,5 @@ -sonar.projectKey=polygon-edge +sonar.projectKey=0xPolygon_polygon-edge +sonar.organization=0xpolygon sonar.sources=. sonar.exclusions=**/*_test.go,**/vendor/**,**/*.py,**/core-contracts/**,**/tests/**