浏览代码

added test coverage build plugin

Sebastian Stenzel 9 年之前
父节点
当前提交
b3c65267df
共有 5 个文件被更改,包括 61 次插入2 次删除
  1. 12 1
      .travis.yml
  2. 9 0
      main/core/pom.xml
  3. 9 0
      main/crypto-aes/pom.xml
  4. 10 1
      main/crypto-api/pom.xml
  5. 21 0
      main/pom.xml

+ 12 - 1
.travis.yml

@@ -1,8 +1,18 @@
 language: java
+
 jdk:
 - oraclejdk8
+
+env:
+  global:
+    - secure: "Lgj042RD0X3rB8VZVZLWP1GetLhjd3PqI5JbJMlzgHJpDI6RkFIBLN9SWAGmkLPCehIp2zA5tu9+UVy0NNMxm9xz6SyjMCaxS28/fnYEXaNmwwDSF6O6gLUbdxyzoYIFPYOPmFxpzhebqnNIsxaM29oZpgRgUGqosCczQxiB+Ng="
+
 before_install: "curl -L --cookie 'oraclelicense=accept-securebackup-cookie;'  http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip -o /tmp/policy.zip && sudo unzip -j -o /tmp/policy.zip *.jar -d `jdk_switcher home oraclejdk8`/jre/lib/security && rm /tmp/policy.zip"
+
 script: mvn -fmain/pom.xml -Puber-jar clean package
+
+after_success: mvn clean test jacoco:report coveralls:report
+
 notifications:
   webhooks:
     urls:
@@ -10,11 +20,12 @@ notifications:
     on_success: change
     on_failure: always
     on_start: false
+
 deploy:
   provider: releases
   prerelease: true
   api_key:
-    secure: ZjE1j93v3qbPIe2YbmhS319aCbMdLQw0HuymmluTurxXsZtn9D4t2+eTr99vBVxGRuB5lzzGezPR5zjk5W7iHF7xhwrawXrFzr2rPJWzWFt0aM+Ry2njU1ROTGGXGTbv4anWeBlgMxLEInTAy/9ytOGNJlec83yc0THpOY2wxnk=
+    secure: "ZjE1j93v3qbPIe2YbmhS319aCbMdLQw0HuymmluTurxXsZtn9D4t2+eTr99vBVxGRuB5lzzGezPR5zjk5W7iHF7xhwrawXrFzr2rPJWzWFt0aM+Ry2njU1ROTGGXGTbv4anWeBlgMxLEInTAy/9ytOGNJlec83yc0THpOY2wxnk="
   file: main/uber-jar/target/Cryptomator-$TRAVIS_TAG.jar
   skip_cleanup: true
   on:

+ 9 - 0
main/core/pom.xml

@@ -74,4 +74,13 @@
 			<artifactId>jackson-databind</artifactId>
 		</dependency>
 	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
 </project>

+ 9 - 0
main/crypto-aes/pom.xml

@@ -77,4 +77,13 @@
 			<scope>provided</scope>
 		</dependency>
 	</dependencies>
+	
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
 </project>

+ 10 - 1
main/crypto-api/pom.xml

@@ -32,4 +32,13 @@
 			<artifactId>commons-collections4</artifactId>
 		</dependency>
 	</dependencies>
-</project>
+	
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 21 - 0
main/pom.xml

@@ -256,6 +256,19 @@
 						</execution>
 					</executions>
 				</plugin>
+				<plugin>
+					<groupId>org.jacoco</groupId>
+					<artifactId>jacoco-maven-plugin</artifactId>
+					<version>0.7.5.201505241946</version>
+					<executions>
+						<execution>
+							<id>prepare-agent</id>
+							<goals>
+								<goal>prepare-agent</goal>
+							</goals>
+						</execution>
+					</executions>
+				</plugin>
 			</plugins>
 		</pluginManagement>
 		<plugins>
@@ -268,6 +281,14 @@
 					<target>1.8</target>
 				</configuration>
 			</plugin>
+			<plugin>
+				<groupId>org.eluder.coveralls</groupId>
+				<artifactId>coveralls-maven-plugin</artifactId>
+				<version>4.0.0</version>
+				<configuration>
+					<repoToken>${env.COVERALLS_REPO_TOKEN}</repoToken>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>