Change paths in coverage tests for sbt layout #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@nh13 RE: com-lihaoyi/mill#613
Glad to see you're using Mill + Scoverage!
Part 1 (Fixing test running under scoverage)
For your first part of the issue (the tests that weren't running). We need to modify where mill is looking for its source files in the test. To get it to find the right files, we follow how the mill
SbtModule
adjusts its search: https://github.com/lihaoyi/mill/blob/master/scalalib/src/MiscModule.scala#L66-L77.We can verify that the paths are the same with the following commands:
And you'll see that the following command completes successfully:
Part 2 (Fixing html report exception)
I've identified the bug causing the htmlReport exception and have implemented a fix to merge into mill: com-lihaoyi/mill#615.
Once the fix is merged in and a new version is released, you will be able to run the htmlReport command successfully.
Note about mixed Java and Scala sources
Scoverage should be able to track the statement coverage for your Scala sources, but I don't think it will
create reports for Java sources.
See the following for more information about this:
Perhaps @RadoBuransky can comment more on the second link since they wrote the article! :)