We have the following commands in our build system to capture tests and code coverage (We use coverlet as a NuGet package)
We build on AWS Codebuild on Linux
Are the files/lines changed in your PRs coverable? PR analysis reporting is limited strictly to what changed in the PR. So if, e.g., your PR changes only comments, then the coverage reported on the PR is going to be -.
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
If anyone comes looking, the issue is related to the AWS Codebuild feature to cache the source. LOCAL_SOURCE_CACHE should be disabled.
LOCAL_SOURCE_CACHE
Caches Git metadata for primary and secondary sources.
After the cache is created, subsequent builds pull only the change between commits. T
his mode is a good choice for projects with a clean working directory and a source that is a large Git repository.
If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.