-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to resolve files with SonarQube in GitHub Actions #448
Comments
Hey, thanks for the report. Looking at the last line it seems that error is coming from SonarQube right? Do you have any more information on that side about exactly what that means? Does it just mean that it's unable to find those files, or maybe something else? Are you sure the path is right? I'm not sure how the setup works but I see |
yes, that error is from the SonarQube scanner, inside Github Actions GHA will clone to /home/runner/work/$repo_name then the repo of course includes src/main/scala etc the sonar scanner works fine locally, but not inside GHA. I'm suspicious of some problem with GHA using symlinks for the folder. |
I ran into this too. The SonarCloud Github Action is using a docker container, which Github Actions runs as docker in docker, where they mount the current Github Action working directory onto /github/workspace. The reports generated by sbt-scoverage (and sbt-scapegoat) use absolute paths to the original working directory, but this only works if the paths are instead to the new mounted directory. The Github Action Dockerfile docs vaguely mention this. The workaround I've found is to rewrite the absolute paths to what's expected.
|
interesting, I will try that |
everything works as expected by doing that workaround. I think it will be worth mentioning somewhere that scoverage won't work as expected when combined with Sonarqube and github actions |
I have an installation of SonarQube 8.9.6 Developer Edition.
I’m trying to upload a coverage report for a scala project, by using the scoverage plugin.
I run sonar-scanner via Github Actions by using the aciton SonarSource/sonarcloud-github-action@v1.6, with the following config:
the report was generated in the step before, by running:
and I can confirm the report is there, and it shows the proper values.
However, when the action is executed in Github, I get:
I have tried running a local copy of SonarQube comunity edition in a docker container, and push the report with sonar-scanner, and I get the expected results.
Is there a problem with this tool in Github Actions in particular?
The text was updated successfully, but these errors were encountered: