Browse Source

Removed codecov, reporting coverage to codacy

Sebastian Stenzel 8 năm trước cách đây
mục cha
commit
2e02e70916
5 tập tin đã thay đổi với 80 bổ sung33 xóa
  1. 5 13
      .travis.yml
  2. 0 9
      main/commons/pom.xml
  3. 63 0
      main/jacoco-report/pom.xml
  4. 9 1
      main/pom.xml
  5. 3 10
      main/ui/pom.xml

+ 5 - 13
.travis.yml

@@ -8,8 +8,9 @@ cache:
   - $HOME/.m2
 env:
   global:
-    - secure: "IfYURwZaDWuBDvyn47n0k1Zod/IQw1FF+CS5nnV08Q+NfC3vGGJMwV8m59XnbfwnWGxwvCaAbk4qP6s6+ijgZNKkvgfFMo3rfTok5zt43bIqgaFOANYV+OC/1c59gYD6ZUxhW5iNgMgU3qdsRtJuwSmfkVv/jKyLGfAbS4kN8BA=" #coverity
-    - secure: "lV9OwUbHMrMpLUH1CY+Z4puLDdFXytudyPlG1eGRsesdpuG6KM3uQVz6uAtf6lrU8DRbMM/T7ML+PmvQ4UoPPYLdLxESLLBat2qUPOIVBOhTSlCc7I0DmGy04CSvkeMy8dPaQC0ukgNiR7zwoNzfcpGRN/U9S8tziDruuHoZSrg=" #bintray
+    - secure: "IfYURwZaDWuBDvyn47n0k1Zod/IQw1FF+CS5nnV08Q+NfC3vGGJMwV8m59XnbfwnWGxwvCaAbk4qP6s6+ijgZNKkvgfFMo3rfTok5zt43bIqgaFOANYV+OC/1c59gYD6ZUxhW5iNgMgU3qdsRtJuwSmfkVv/jKyLGfAbS4kN8BA=" # COVERITY_SCAN_TOKEN
+    - secure: "lV9OwUbHMrMpLUH1CY+Z4puLDdFXytudyPlG1eGRsesdpuG6KM3uQVz6uAtf6lrU8DRbMM/T7ML+PmvQ4UoPPYLdLxESLLBat2qUPOIVBOhTSlCc7I0DmGy04CSvkeMy8dPaQC0ukgNiR7zwoNzfcpGRN/U9S8tziDruuHoZSrg=" # BINTRAY_API_KEY
+    - secure: "oWFgRTVP6lyTa7qVxlvkpm20MtVc3BtmsNXQJS6bfg2A0o/iCQMNx7OD59BaafCLGRKvCcJVESiC8FlSylVMS7CDSyYu0gg70NUiIuHp4NBM5inFWYCy/PdQsCTzr5uvNG+rMFQpMFRaCV0FrfM3tLondcVkhsHL68l93Xoexx4=" # CODACY_PROJECT_TOKEN
 addons:
   coverity_scan:
     project:
@@ -19,19 +20,10 @@ addons:
     branch_pattern: release.*
 install:
 # "clean" needed until https://bugs.openjdk.java.net/browse/JDK-8067747 is resolved.
-- mvn -fmain/pom.xml clean package -DskipTests dependency:go-offline -Ptest-coverage
+- mvn -fmain/pom.xml clean package -DskipTests dependency:go-offline -Pcoverage
 - mvn -fmain/pom.xml clean package -DskipTests dependency:go-offline -Prelease
 script:
-- mvn --update-snapshots -fmain/pom.xml -Ptest-coverage clean test jacoco:report-aggregate
-after_success:
-- "bash <(curl -s https://codecov.io/bash)"
-notifications:
-  webhooks:
-    urls:
-    - https://webhooks.gitter.im/e/7d429ab35361726e26f2
-    on_success: change
-    on_failure: always
-    on_start: false
+- mvn --update-snapshots -fmain/pom.xml clean test jacoco:report verify -Pcoverage
 before_deploy:
 - mvn -fmain/pom.xml -Prelease clean package -DskipTests
 deploy:

+ 0 - 9
main/commons/pom.xml

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

+ 63 - 0
main/jacoco-report/pom.xml

@@ -11,6 +11,47 @@
 	<name>Cryptomator Code Coverage Report</name>
 	<packaging>pom</packaging>
 
+	<dependencies>
+		<!-- all modules containing unit tests: -->
+		<dependency>
+			<groupId>org.cryptomator</groupId>
+			<artifactId>commons</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.cryptomator</groupId>
+			<artifactId>keychain</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.cryptomator</groupId>
+			<artifactId>ui</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.cryptomator</groupId>
+			<artifactId>launcher</artifactId>
+			<exclusions>
+				<exclusion>
+					<!-- conflict with codacy-coverage-reporter -->
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>*</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		
+		<!-- binary dependency used during build -->
+		<dependency>
+			<groupId>com.codacy</groupId>
+			<artifactId>codacy-coverage-reporter</artifactId>
+			<version>1.0.13</version>
+			<classifier>assembly</classifier>
+			<exclusions>
+				<exclusion>
+					<groupId>*</groupId>
+					<artifactId>*</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+	</dependencies>
+
 	<build>
 		<plugins>
 			<plugin>
@@ -26,6 +67,28 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
+				<version>1.5.0</version>
+				<executions>
+					<execution>
+						<phase>verify</phase>
+						<goals>
+							<goal>java</goal>
+						</goals>
+						<configuration>
+							<mainClass>com.codacy.CodacyCoverageReporter</mainClass>
+							<arguments>
+								<argument>-l</argument>
+								<argument>Java</argument>
+								<argument>-r</argument>
+								<argument>${project.build.directory}/site/jacoco-aggregate/jacoco.xml</argument>
+							</arguments>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 9 - 1
main/pom.xml

@@ -269,10 +269,18 @@
 			</modules>
 		</profile>
 		<profile>
-			<id>test-coverage</id>
+			<id>coverage</id>
 			<modules>
 				<module>jacoco-report</module>
 			</modules>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.jacoco</groupId>
+						<artifactId>jacoco-maven-plugin</artifactId>
+					</plugin>
+				</plugins>
+			</build>
 		</profile>
 	</profiles>
 

+ 3 - 10
main/ui/pom.xml

@@ -99,16 +99,9 @@
 		
 		<!-- Logging -->
 		<dependency>
-			<groupId>org.apache.logging.log4j</groupId>
-			<artifactId>log4j-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.logging.log4j</groupId>
-			<artifactId>log4j-slf4j-impl</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.logging.log4j</groupId>
-			<artifactId>log4j-jul</artifactId>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<scope>test</scope>
 		</dependency>
 	</dependencies>
 </project>