From 2141b122f945d52b870e45257c7b4dffceed2973 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 3 May 2022 14:46:38 +0100 Subject: [PATCH] Tweak sonarqube run (#8475) --- .github/workflows/sonarqube.yml | 4 ++-- sonar-project.properties | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index d81aeac311..7029be97f3 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -8,6 +8,7 @@ jobs: sonarqube: name: SonarQube runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' steps: - uses: actions/checkout@v2 with: @@ -17,7 +18,6 @@ jobs: # (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: - name: Download Coverage Report uses: actions/github-script@v3.1.0 - if: github.event.workflow_run.conclusion == 'success' with: script: | const artifacts = await github.actions.listWorkflowRunArtifacts({ @@ -36,9 +36,9 @@ jobs: }); const fs = require('fs'); fs.writeFileSync('${{github.workspace}}/coverage.zip', Buffer.from(download.data)); + - name: Extract Coverage Report run: unzip -d coverage coverage.zip && rm coverage.zip - if: github.event.workflow_run.conclusion == 'success' - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master diff --git a/sonar-project.properties b/sonar-project.properties index e172bfbfa2..b6516cb92a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -19,4 +19,3 @@ sonar.typescript.tsconfigPath=./tsconfig.json sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.coverage.exclusions=spec/*.ts sonar.testExecutionReportPaths=coverage/test-report.xml -sonar.genericcoverage.unitTestReportPaths=coverage/test-report.xml