Skip to content

Commit

Permalink
Integrate scoverage
Browse files Browse the repository at this point in the history
  • Loading branch information
aldemirenes committed Aug 17, 2019
1 parent 03d9a97 commit 7f2485b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ lazy val root = project.in(file("."))
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.mimaSettings)
.settings(BuildSettings.scoverageSettings)
.settings(Seq(
shellPrompt := { _ => name.value + " > " }
))
Expand Down
13 changes: 13 additions & 0 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import bintray.BintrayKeys._
import com.typesafe.tools.mima.plugin.MimaKeys._
import com.typesafe.tools.mima.plugin.MimaPlugin

// Scoverage plugin
import scoverage.ScoverageKeys._

object BuildSettings {

// Basic settings for our app
Expand Down Expand Up @@ -78,4 +81,14 @@ object BuildSettings {
(test in Test).value
}
)

val scoverageSettings = Seq(
coverageEnabled := true,
coverageMinimum := 80,
coverageFailOnMinimum := true,
coverageHighlighting := false,
(test in Test) := {
(coverageReport dependsOn (test in Test)).value
}
)
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.5.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")

0 comments on commit 7f2485b

Please sign in to comment.