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 # 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 & - while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
- scripts/run_travis_tests.sh $TEST_SUITE - 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> <groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId> <artifactId>apache-rat-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

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

View File

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

View File

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

View File

@@ -155,6 +155,24 @@
</execution> </execution>
</executions> </executions>
</plugin> </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> </plugins>
<resources> <resources>
<resource> <resource>
@@ -193,6 +211,11 @@
<artifactId>hudi-spark_${scala.binary.version}</artifactId> <artifactId>hudi-spark_${scala.binary.version}</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-timeline-service</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Parquet --> <!-- Parquet -->
<dependency> <dependency>

View File

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