SBT plugin that uploads scala code coverage to https://coveralls.io and integrates with Travis CI. This plugin uses scct to generate the code coverage metrics.
For an example project that uses this plugin click here
For example output click here
- Adding the following to your
project/build.sbtfile
resolvers += Classpaths.typesafeResolver
resolvers ++= Seq(
"scct-github-repository" at "http://mtkopone.github.com/scct/maven-repo"
)
addSbtPlugin("reaktor" % "sbt-scct" % "0.2-SNAPSHOT")
addSbtPlugin("com.github.theon" %% "xsbt-coveralls-plugin" % "0.0.2")- Add the following to your
build.sbt
seq(ScctPlugin.instrumentSettings : _*)-
Register on
https://coveralls.io/and get a repo token -
Follow the instructions for either Travis CI or Manual Usage
xsbt-coverall-plugin can be run by Travis CI by following these instructions:
-
Add the following to you
travis.ymlscript: "sbt coveralls test"
-
Job done! Commit these changes to
travis.ymlto kick off your Travis build and you should see coverage reports appear on http://coveralls.io
-
Either write your token into the file
~/.sbt/coveralls.repo.tokenor into the environment variableCOVERALLS_REPO_TOKENexport COVERALLS_REPO_TOKEN=
-
In the SBT console run the command
coveralls test. This should run your test suite, generate code coverage reports and upload the reports tocoveralls.io. After running the command, you should see output similar to the following:Uploading to coveralls.io succeeded: Job #17.1 https://coveralls.io/jobs/12207
For example output click here
Add the following to your project/build.sbt file
resolvers += Classpaths.typesafeResolver
resolvers ++= Seq(
"scct-github-repository" at "http://mtkopone.github.com/scct/maven-repo",
"sonatype-oss-repo" at "https://oss.sonatype.org/content/groups/public/"
)
addSbtPlugin("reaktor" % "sbt-scct" % "0.2-SNAPSHOT")
addSbtPlugin("com.github.theon" %% "xsbt-coveralls-plugin" % "0.0.3-SNAPSHOT")For a list of features that going to be implemented see the issue tracker
xsbt-coveralls-plugin is open source software released under the Apache 2 License.

