Update sonarqube.yml

This commit is contained in:
Michael Telatynski
2022-11-03 11:59:54 +00:00
committed by GitHub
parent a07fe44565
commit dee2b60c3d
+26
View File
@@ -8,8 +8,34 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: true
jobs:
# This is a workaround for https://github.com/SonarSource/SonarJS/issues/578
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
reportPaths: ${{ steps.extraArgs.outputs.reportPaths }}
testExecutionReportPaths: ${{ steps.extraArgs.outputs.testExecutionReportPaths }}
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: coverage
path: coverage
- id: extraArgs
run: |
coverage=$(find coverage -type f -name '*lcov.info' -printf "%p,")
echo "{reportPaths}={$coverage}" >> $GITHUB_OUTPUT
testResults=$(find coverage -type f -name '*test-result.xml' -printf "%p,")
echo "{testExecutionReportPaths}={$testResults}" >> $GITHUB_OUTPUT
sonarqube:
name: 🩻 SonarQube
needs: prepare
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
extraArgs: |
-Dsonar.javascript.lcov.reportPaths=${{ needs.prepare.outputs.reportPaths }}
-Dsonar.testExecutionReportPaths=${{ needs.prepare.outputs.testExecutionReportPaths }}