Skip to content

Commit

Permalink
Add coveralls code coverage support
Browse files Browse the repository at this point in the history
Resolves #97
  • Loading branch information
objectiser committed Jun 10, 2017
1 parent 8f539c4 commit be27280
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ branches:
except:
- /^[0-9]/

after_success:
- mvn jacoco:report coveralls:report

env:
global:
# Ex. travis encrypt -r org/repo GH_TOKEN=XXX-https://github.com/settings/tokens-XXX
Expand Down
9 changes: 8 additions & 1 deletion modules/parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
</execution>
</executions>
</plugin>
</plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
<version.maven-javadoc-plugin>2.10.4</version.maven-javadoc-plugin>
<version.io.takari-maven>0.3.4</version.io.takari-maven>
<version.io.zikin.centralsync-maven-plugin>0.1.0</version.io.zikin.centralsync-maven-plugin>

<version.coveralls-maven-plugin>4.3.0</version.coveralls-maven-plugin>
<version.jacoco-maven-plugin>0.7.9</version.jacoco-maven-plugin>
</properties>

<modules>
Expand Down Expand Up @@ -255,6 +258,7 @@
<exclude>**/Scribble.g</exclude>
<exclude>**/Scribble-0.3.original</exclude>
<exclude>**/IGNORE</exclude>
<exclude>.coveralls.yml</exclude>
</excludes>
</configuration>
<executions>
Expand Down Expand Up @@ -286,6 +290,31 @@
<packageName>scribble-java</packageName>
</configuration>
</plugin>

<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>${version.coveralls-maven-plugin}</version>
<configuration>
<sourceEncoding>UTF-8</sourceEncoding>
<sourceDirectories>
<sourceDirectory>${project.basedir}/modules/parser/target/generated-sources/antlr3</sourceDirectory>
</sourceDirectories>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco-maven-plugin}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit be27280

Please sign in to comment.