Can't get scoverage report to import

Hi all

We’re using sonarcloud on an open source project.
I’m trying to setup scoverage but can’t get sonarcloud to import the report.

We’re using GitHub actions to execute the build. Result is here:

In step “Build with Maven for Scala 2.12” you can see that it successfully generated the scoverage report:
[INFO] Written XML coverage report [/home/runner/work/smart-data-lake/smart-data-lake/target/scoverage.xml]

In sonarcloud under Administration → Languages → Scala → Path to Scoverage report, I’m trying to set the correct path.
So far I’ve tried:

  • **/target/scoverage.xml
  • target/scoverage.xml
  • **\target\scoverage.xml
  • target\scoverage.xml
  • /home/runner/work/smart-data-lake/smart-data-lake/target/scoverage.xml

But for all of these, I receive a warning
Unable to import 1 Scoverage report file(s). Please check that property 'sonar.scala.coverage.reportPaths' is correctly configured and the analysis logs for more details.

What’s the correct path to put here?

Hey there.

No matter what configuration you do, coverage information is not available when using Automatic Analysis – you would have to switch to CI-based analysis to import your coverage reports.

I still find it really insightful how you expected it to work – so I’ll pass that along. :slight_smile: We would eventually like to have coverage information available in automatic analysis scenarios.

Ah, that explains it of course! Didn’t see that, thanks for the information.
I’ll have to see how much work it is to switch to GitHub actions. :+1: