Upload coverage.out report to Sonarqube

Hi everyone,

I am creating a workflow that generates a test report named coverage.out. I’m trying to upload the report to Sonarqube. So I’m using this action

- name: SonarQube Scan
        uses: SonarSource/sonarqube-scan-action@master
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

I’m giving the path of coverage report in Sonar-project.properties:-

sonar.go.coverage.reportPaths=coverage.out

is this action will scan the repo also and also push the coverage.out report to sonarqube using sonar-project.properties without doing anything else?

Yes, that should all work.

If it seems to not be working, check out this guide for how to find the logs related to code coverage import:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.