This is an automated email from the ASF dual-hosted git repository. vinoth pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git
The following commit(s) were added to refs/heads/master by this push: new acf359c [HUDI-627] Aggregate code coverage and publish to codecov.io during CI (#1347) acf359c is described below commit acf359c834bc1d9b9c4ea64d362ea20c7410c70a Author: Ramachandran M S <mramachand...@uber.com> AuthorDate: Thu Feb 27 13:54:20 2020 -0800 [HUDI-627] Aggregate code coverage and publish to codecov.io during CI (#1347) --- .travis.yml | 2 ++ hudi-hadoop-mr/pom.xml | 4 ++++ hudi-hive/pom.xml | 4 ++++ hudi-spark/pom.xml | 4 ++++ hudi-timeline-service/pom.xml | 4 ++++ packaging/hudi-spark-bundle/pom.xml | 23 +++++++++++++++++++++++ pom.xml | 9 ++------- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d8b7bc8..76aeacf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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) diff --git a/hudi-hadoop-mr/pom.xml b/hudi-hadoop-mr/pom.xml index a3cac30..b6dc87d 100644 --- a/hudi-hadoop-mr/pom.xml +++ b/hudi-hadoop-mr/pom.xml @@ -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> diff --git a/hudi-hive/pom.xml b/hudi-hive/pom.xml index f0adb63..ea76c4c 100644 --- a/hudi-hive/pom.xml +++ b/hudi-hive/pom.xml @@ -202,6 +202,10 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> </plugins> </build> </project> diff --git a/hudi-spark/pom.xml b/hudi-spark/pom.xml index 511cd67..4ba864e 100644 --- a/hudi-spark/pom.xml +++ b/hudi-spark/pom.xml @@ -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> diff --git a/hudi-timeline-service/pom.xml b/hudi-timeline-service/pom.xml index 1f5292a..2d09d4c 100644 --- a/hudi-timeline-service/pom.xml +++ b/hudi-timeline-service/pom.xml @@ -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> diff --git a/packaging/hudi-spark-bundle/pom.xml b/packaging/hudi-spark-bundle/pom.xml index 754b5cf..ddfb7e5 100644 --- a/packaging/hudi-spark-bundle/pom.xml +++ b/packaging/hudi-spark-bundle/pom.xml @@ -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> diff --git a/pom.xml b/pom.xml index 6e62132..e281000 100644 --- a/pom.xml +++ b/pom.xml @@ -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>