How to upload unit test coverage to an AutoConfig C++ project

We have a GitHub hosted C++ project using SonarQube Cloud in AutoConfig mode: so our CI does not run the SonarQube scanner.

We also generate unit test coverage via GitHub actions.

I have tried using the SonarSource/sonarqube-scan-action@v6 action to upload the coverage report, but it generates an error: ERROR You are running CI analysis while Automatic Analysis is enabled. Please consider disabling one or the other.

How can I upload the unit test coverage to SonarQube Cloud without having to revert to manual scanning?

Hi,

Sorry, you can’t. If you need to include test coverage, you’ll need to disable automatic analysis and move the full analysis into your CI.

 
HTH,
Ann

Hi @tx_haggis

Briefly reopenning this thread.
You have been using the Automatic Analysis for C and C++ on SonarQube Cloud and indeed, we have this limitation about the automatic analysis in general : you cannot upload your coverage.

Now, we just released Autoconfig for C and C++ for SonarQube Cloud. With it, you can scan the code from your CI with a much simplified configuration and from there, you can upload your coverage.