From 2173858802325ac1783545e92ce24d118b6bf6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=BCrl?= Date: Sun, 13 Oct 2024 14:04:58 +0200 Subject: [PATCH 1/2] enable sonarcloud analysis --- .github/workflows/build.yml | 13 ++++--------- sonar-project.properties | 4 +++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52a7f02..9f4879c 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 }}is red, uncomment the \ 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 From b536832e86c14fe403683d7900d3130505c089f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=BCrl?= Date: Sun, 13 Oct 2024 14:15:33 +0200 Subject: [PATCH 2/2] fix build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f4879c..7e94577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,4 +50,4 @@ jobs: uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}is red, uncomment the \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file