Lcov coverage is not being uploaded to Sonarcloud from Github action

Lcov coverage is always 0 when running from the GithubActions

  • ALM used: GitHub
  • CI system used: GithubActions
  • Scanner command used when applicable (private details masked):
- name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@v1.6
          GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          args: >
  • Languages of the repository
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    Coverage is always 0 on Sonarcloud.
    Log: Sonarcloud.log · GitHub
    I tried to run sonar-scanner locally with the same parameters and the coverage was uploaded successfully


Are you actually running your tests and generating the coverage report in your Github Action before running the SonarCloud analysis ?

It might work locally because you have the coverage report on your machine, but not in the Github Action env.