1
0

[HUDI-627] Aggregate code coverage and publish to codecov.io during CI (#1347)

This commit is contained in:
Ramachandran M S
2020-02-27 13:54:20 -08:00
committed by GitHub
parent 71170fafe7
commit acf359c834
7 changed files with 43 additions and 7 deletions

View File

@@ -37,3 +37,5 @@ script:
# https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
- while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
- scripts/run_travis_tests.sh $TEST_SUITE
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@@ -114,6 +114,10 @@
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -202,6 +202,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -144,6 +144,10 @@
<groupId>org.scalastyle</groupId>
<artifactId>scalastyle-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

View File

@@ -55,6 +55,10 @@
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>

View File

@@ -155,6 +155,24 @@
</execution>
</executions>
</plugin>
<!-- Adding test coverage report aggregation to this module as this seems to cover all of the required dependencies -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
@@ -193,6 +211,11 @@
<artifactId>hudi-spark_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-timeline-service</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Parquet -->
<dependency>

View File

@@ -115,6 +115,7 @@
<utilities.bundle.hive.scope>provided</utilities.bundle.hive.scope>
<utilities.bundle.hive.shade.prefix></utilities.bundle.hive.shade.prefix>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<jacoco.version>0.8.5</jacoco.version>
</properties>
<scm>
@@ -264,7 +265,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.8</version>
<version>${jacoco.version}</version>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
@@ -275,10 +276,6 @@
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
</configuration>
</execution>
<!--
Ensures that the code coverage report for unit tests is created after
@@ -291,8 +288,6 @@
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>