File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 66[ ![ SBT 1.0 version] ( https://img.shields.io/badge/sbt_1.0-3.0.3-blue.svg )] ( https://bintray.com/stringbean/sbt-plugins/sbt-jacoco )
77
88This is an [ sbt] ( http://scala-sbt.org/ ) plugin for code coverage analysis via [ JaCoCo] ( http://www.eclemma.org/jacoco/ ) .
9+ Supports uploading results to [ Coveralls] ( https://coveralls.io ) and [ Codecov] ( https://codecov.io ) .
910
1011Install the plugin by adding the following to ` project/plugins.sbt ` :
1112
Original file line number Diff line number Diff line change 1+ # Coverage Services
2+
3+ Examples of uploading to [ Coveralls] ( https://coveralls.io/ ) and [ Codecov] ( https://codecov.io/gh ) can be found in the
4+ example project: [ stringbean/sbt-jacoco-example] ( https://github.com/stringbean/sbt-jacoco-example )
5+
6+ ## Coveralls
7+
8+ Enable the Coveralls plugin:
9+
10+ ``` scala
11+ enablePlugins(JacocoCoverallsPlugin )
12+ ```
13+
14+ Then run ` sbt jacocoCoveralls ` to upload the results to Coveralls:
15+
16+ ```
17+ [info] Upload complete
18+ ```
19+
20+ <!-- TODO extra config -->
21+
22+ ## Codecov
23+
24+ The Codecov uploader script will upload coverage automatically if the XML formatter is enabled. For example:
25+
26+ ``` scala
27+ jacocoReportSettings := JacocoReportSettings (
28+ " Jacoco Coverage Report" ,
29+ None ,
30+ JacocoThresholds (),
31+ Seq (JacocoReportFormats .ScalaHTML , JacocoReportFormats .XML ), // note XML formatter
32+ " utf-8" )
33+ ```
34+
35+ With this enabled run the Codecov script:
36+
37+ ``` shell
38+ bash <( curl -s https://codecov.io/bash)
39+ ```
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Key features of _sbt-jacoco_ include:
1414* [ Getting Started] ( getting-started.md )
1515* [ Integration Tests] ( integration-tests.md )
1616* [ Multi-Project Builds] ( multi-project.md )
17+ * [ Coverage Services] ( coverage-services.md )
1718* [ Settings Reference] ( settings.md )
1819* [ Contributors] ( contributors.md )
1920
You can’t perform that action at this time.
0 commit comments