Skip to content

Commit 7a91d58

Browse files
committed
Merge pull request #17 from GoogleCloudPlatform/coverage2
Add Travis Icon and Cobertura Coverage
2 parents 2d3f224 + 9661002 commit 7a91d58

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ before_install:
66
- openssl aes-256-cbc -K $encrypted_99d8b304f94b_key -iv $encrypted_99d8b304f94b_iv -in service-account.json.enc -out service-account.json -d
77

88
script: mvn test
9+
after_success:
10+
- mvn clean cobertura:cobertura coveralls:report

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# java-docs-samples
22

3+
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/java-docs-samples.svg)](https://travis-ci.org/GoogleCloudPlatform/java-docs-samples)
4+
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/java-docs-samples/badge.svg)](https://coveralls.io/r/GoogleCloudPlatform/java-docs-samples)
5+
36
This is a repository that contains java code snippets on [Cloud Platform Documentation](https://cloud.google.com/docs/).
7+

pom.xml

+27
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,34 @@
4545
</execution>
4646
</executions>
4747
</plugin>
48+
<plugin>
49+
<groupId>org.eluder.coveralls</groupId>
50+
<artifactId>coveralls-maven-plugin</artifactId>
51+
<version>3.1.0</version>
52+
<configuration>
53+
<coberturaReports>
54+
<coberturaReport>${basedir}/target/coverage.xml</coberturaReport>
55+
</coberturaReports>
56+
</configuration>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.codehaus.mojo</groupId>
60+
<artifactId>cobertura-maven-plugin</artifactId>
61+
<version>2.6</version>
62+
<configuration>
63+
<outputDirectory>${basedir}/target</outputDirectory>
64+
<formats>
65+
<format>xml</format>
66+
<format>html</format>
67+
</formats>
68+
<format>xml</format>
69+
<maxmem>256m</maxmem>
70+
<!-- aggregated reports for multi-module projects -->
71+
<aggregate>true</aggregate>
72+
</configuration>
73+
</plugin>
4874
</plugins>
75+
4976
</build>
5077

5178
<dependencyManagement>

0 commit comments

Comments
 (0)