This plugin generates and publishes scoverage summary reports for SBT projects. Summary report can be published as a GitHub comment in a pull request. This project uses it itself, and could be used as a reference for usage (as well as other H8IO projects).
- coverageSummaryFormat - type is
Format,
at this moment only one value is implemented:
GitHubFlavoredMarkdown(default), but there is no limitations to implement it in other projects. - coverageSummaryLayout - type is
Layout,
values are
- Auto - choose a layout depends on number of tested modules. There are two layouts: for a single-module projects, another one for multimodule projects.
- Multi - always show multimodule project layout.
- Total - show only total summary value.
- coverageSummaryLowThreshold - type is Float, this value is used to color in red when coverage rate is lesser or equal than this value.
- coverageSummaryHighThreshold - type is Float, this value is used to color in green when coverage rate is greater or equal than this value.
Add
addSbtPlugin("io.h8.sbt" % "sbt-scoverage-summary" % "x.x.x")In the root project enable ScoverageSummaryPlugin
A full example of usage could be found here.
- name: Create scoverage summary
run: sbt clean +coverage +test +coverageSummary- name: Publish scoverage summary
uses: h8io/gha/actions/publish-scoverage-summary@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}