Skip to content

Commit db5680b

Browse files
committed
Report code coverage to coveralls.io
1 parent 835ed97 commit db5680b

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.travis.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,16 @@ before_script:
1212
- src/test/travis.pre.sh
1313

1414
script:
15-
- mvn verify
15+
- |
16+
if [ "${TRAVIS_JDK_VERSION}" = openjdk11 ]; then
17+
mvn verify jacoco:report
18+
else
19+
mvn verify
20+
fi
1621
- sudo cat /var/log/tarantool/jdk-testing.log
22+
23+
after_success:
24+
- |
25+
if [ "${TRAVIS_JDK_VERSION}" = openjdk11 ]; then
26+
mvn coveralls:report -DrepoToken=${COVERALLS_TOKEN}
27+
fi

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![Coverage Status][coveralls-badge]][coveralls-page]
2+
3+
[coveralls-badge]: https://coveralls.io/repos/github/tarantool/tarantool-java/badge.svg?branch=connector-1.8.jdbc
4+
[coveralls-page]: https://coveralls.io/github/tarantool/tarantool-java?branch=connector-1.8.jdbc
15

26
First you should add snaphost repository and dependency to your pom file
37
```xml

pom.xml

+27
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,33 @@
6363
</execution>
6464
</executions>
6565
</plugin>
66+
<plugin>
67+
<groupId>org.jacoco</groupId>
68+
<artifactId>jacoco-maven-plugin</artifactId>
69+
<version>0.8.2</version>
70+
<executions>
71+
<execution>
72+
<id>prepare-agent</id>
73+
<goals>
74+
<goal>prepare-agent</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
</plugin>
79+
<plugin>
80+
<groupId>org.eluder.coveralls</groupId>
81+
<artifactId>coveralls-maven-plugin</artifactId>
82+
<version>4.3.0</version>
83+
<dependencies>
84+
<!-- Support reporting to coveralls on Java 9. -->
85+
<!-- https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
86+
<dependency>
87+
<groupId>javax.xml.bind</groupId>
88+
<artifactId>jaxb-api</artifactId>
89+
<version>2.3.1</version>
90+
</dependency>
91+
</dependencies>
92+
</plugin>
6693
</plugins>
6794
</build>
6895

0 commit comments

Comments
 (0)