diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52a7f02..7e94577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,14 +45,9 @@ jobs: - name: Build run: poetry build - - uses: sonarsource/sonarqube-scan-action@v3 + - name: SonarCloud Scan if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-22.04' && matrix.poetry-version == '1.7.1' + uses: SonarSource/sonarcloud-github-action@master env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - # If you wish to fail your job when the Quality Gate is red, uncomment the - # following lines. This would typically be used to fail a deployment. - # - uses: sonarsource/sonarqube-quality-gate-action@master - # timeout-minutes: 5 - # env: - # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index e5bef43..9cadc30 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,6 @@ -sonar.projectKey=scan-pdf +sonar.projectKey=wuan_scan-pdf +sonar.organization=wuan + sonar.python.coverage.reportPaths=reports/coverage.xml sonar.python.xunit.reportPath=reports/junit.xml sonar.python.version=3