Skip to content

Commit

Permalink
Merge pull request #151 from twitter/add-coveralls
Browse files Browse the repository at this point in the history
Add code coverage support with coveralls
  • Loading branch information
capotej committed Jul 8, 2014
2 parents 8709fe7 + 7e9b1db commit 0d38bfc
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
@@ -1,4 +1,7 @@
language: scala
scala:
- 2.9.2
- 2.10.0
language: scala
script:
- sbt test
- sbt coveralls
scala:
- 2.9.2
- 2.10.0
2 changes: 1 addition & 1 deletion README.markdown
@@ -1,4 +1,4 @@
# Finatra [![Build Status](https://secure.travis-ci.org/twitter/finatra.png?branch=master)](http://travis-ci.org/twitter/finatra)
# Finatra [![Build Status](https://secure.travis-ci.org/twitter/finatra.png?branch=master)](http://travis-ci.org/twitter/finatra) [![Coverage Status](https://coveralls.io/repos/twitter/finatra/badge.png?branch=master)](https://coveralls.io/r/twitter/finatra?branch=master)

[Finatra](http://finatra.info) is a sinatra-inspired web framework for scala, running on top of [Finagle](http://twitter.github.com/finagle/)

Expand Down
7 changes: 7 additions & 0 deletions build.sbt
Expand Up @@ -20,6 +20,11 @@ libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-databind" % "2.2.2"
)

// for code coverage
instrumentSettings

coverallsSettings

scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")

//Release
Expand All @@ -30,6 +35,8 @@ resolvers +=
resolvers +=
"Local Maven Repository" at "file:///"+Path.userHome+"/.m2/repository"

resolvers += Classpaths.sbtPluginReleases

publishMavenStyle := true

publishTo := {
Expand Down
41 changes: 40 additions & 1 deletion pom.xml
Expand Up @@ -160,7 +160,7 @@
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0-M2</version>
<version>1.0</version>
<executions>
<execution>
<id>test</id>
Expand Down Expand Up @@ -196,6 +196,45 @@
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<sourceDirectory>src/main/scala</sourceDirectory>
<serviceName>travis-ci</serviceName>
</configuration>
<executions>
<execution>
<id>coveralls-jacoco</id>
<phase>package</phase>
<goals>
<goal>jacoco</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<phase>initialize</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!--<plugin>-->
<!--<groupId>com.cloudbees</groupId>-->
<!--<artifactId>maven-license-plugin</artifactId>-->
Expand Down
3 changes: 3 additions & 0 deletions project/plugins.sbt
@@ -0,0 +1,3 @@
addSbtPlugin("com.sksamuel.scoverage" % "sbt-scoverage" % "0.95.1")

addSbtPlugin("com.sksamuel.scoverage" %% "sbt-coveralls" % "0.0.5")

0 comments on commit 0d38bfc

Please sign in to comment.