I am using GitHub + GitHub Actions with SonarCloud and I’m not having a lot of success getting to a sort of minimum working state. I’m coming from using Coveralls, and I’m looking to have the same experience (PRs get marked if they meet/fail code coverage thresholds) plus hopefully other quality metrics.
Here’s an example build: testing by dougmoscrop · Pull Request #9 · dougmoscrop/serverless-plugin-log-subscription · GitHub
Things that I’ve encountered so far that were confusing/difficult:
-
I have to relativize my lcov file (see https://github.com/dougmoscrop/serverless-plugin-log-subscription/blob/master/.github/workflows/default.yml#L25) or the Sonar analyzer says it can’t find the files – is this normal?
-
My pull requests first reported coverage as – (I was doing a negative test where I decreased test coverage expecting it to update the pull request status to failed), and now subsequent runs fail with a message like:
No need to run analysis. It is already triggered by the push event.
This makes me feel like automated analysis might be running, but I don’t have a .sonarcloud.properties
file.
Any help would be appreciated, but a repo that has this all configured and working would be a sweet reference.