diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 6552902..bc82b93 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -96,43 +96,3 @@ jobs: ./go/ocr2/decryptionplugin/ocr2_decryptionplugin_race_coverage.txt ./go/tdh2/tdh_coverage.txt ./go/tdh2/tdh_race_coverage.txt - - - sonar-scan: - name: SonarQube - needs: [golangci-lint, build-and-test] - runs-on: ubuntu-latest - if: always() - steps: - - name: Checkout the repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 # fetch all history for all tags and branches to provide more metadata for sonar reports - - - name: Download all workflow run artifacts - uses: actions/download-artifact@v4 - - - name: Update golangci-lint report symlinks - # When golangci-lint is run in a multimodule project, it creates a report with relative paths to the files which should be updated - # The command returns true to avoid failing the workflow if the report is not found - continue-on-error: true - run: | - sed -i 's@file\ name="@file\ name="/github/workspace/go/ocr2/decryptionplugin/@' ./golangci-lint-report/ocr2/decryptionplugin/golangci-lint-report.xml && echo "OCR2 golangci-lint report symlinks updated" - sed -i 's@file\ name="@file\ name="/github/workspace/go/tdh2/@' ./golangci-lint-report/tdh2/golangci-lint-report.xml && echo "TDH2 golangci-lint report symlinks updated" - - - name: Set SonarQube Report Paths - id: sonarqube_report_paths - shell: bash - run: | - echo "sonarqube_coverage_report_paths=$(find -type f -name '*coverage.txt' -printf "%p,")" >> $GITHUB_OUTPUT - echo "sonarqube_golangci_report_paths=$(find -type f -name 'golangci-lint-report.xml' -printf "%p,")" >> $GITHUB_OUTPUT - - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@69c1a75940dec6249b86dace6b630d3a2ae9d2a7 # v2.0.1 - with: - args: > - -Dsonar.go.coverage.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths }} - -Dsonar.go.golangci-lint.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_golangci_report_paths }} - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}