This is an automated email from the ASF dual-hosted git repository.
nsivabalan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 2912bf63bf04 chore(ci): upload integration-test coverage to Codecov
(#19130)
2912bf63bf04 is described below
commit 2912bf63bf0401f4e1bcd9f876da77e11bf2e708
Author: Y Ethan Guo <[email protected]>
AuthorDate: Wed Jul 1 15:26:14 2026 -0700
chore(ci): upload integration-test coverage to Codecov (#19130)
The integration-tests job ran hudi-cli and hudi-integ-test but reported
no coverage — the integration-tests Maven profile wired no JaCoCo agent
and the job had no upload step. hudi-cli is excluded from the unit and
functional jobs, so its coverage went unreported entirely.
- pom.xml: attach the JaCoCo prepare-agent to the integration-tests
profile via argLine, writing exec data under target/jacoco-agent/ so
the existing merge script picks it up. Both failsafe (IT) and surefire
(integ-test UT) inherit the agent from argLine.
- bot.yml: pass -Djacoco.skip=false on the UT integ-test and IT steps
and add the standard merge + Codecov upload steps under the
integration-tests flag.
---
.github/workflows/bot.yml | 15 +++++++++++++--
pom.xml | 18 ++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml
index 36742a585f81..99fb6ba9a8be 100644
--- a/.github/workflows/bot.yml
+++ b/.github/workflows/bot.yml
@@ -1404,7 +1404,7 @@ jobs:
SPARK_PROFILE: ${{ matrix.sparkProfile }}
SCALA_PROFILE: '-Dscala-2.12 -Dscala.binary.version=2.12'
run:
- mvn test $SCALA_PROFILE -D"$SPARK_PROFILE" -Pintegration-tests
-DskipUTs=false -DskipITs=true -pl hudi-integ-test $MVN_ARGS
+ mvn test $SCALA_PROFILE -D"$SPARK_PROFILE" -Pintegration-tests
-DskipUTs=false -DskipITs=true -pl hudi-integ-test $MVN_ARGS -Djacoco.skip=false
- name: 'IT'
if: needs.changes.outputs.relevant == 'true'
env:
@@ -1419,7 +1419,18 @@ jobs:
SPARK_ARCHIVE_BASENAME=$(basename $SPARK_ARCHIVE)
export SPARK_HOME=$GITHUB_WORKSPACE/${SPARK_ARCHIVE_BASENAME%.*}
rm -f $GITHUB_WORKSPACE/$SPARK_ARCHIVE
- mvn verify $SCALA_PROFILE -D"$SPARK_PROFILE" -Pintegration-tests -pl
!hudi-flink-datasource/hudi-flink $MVN_ARGS
+ mvn verify $SCALA_PROFILE -D"$SPARK_PROFILE" -Pintegration-tests -pl
!hudi-flink-datasource/hudi-flink $MVN_ARGS -Djacoco.skip=false
+ - name: Generate merged coverage report
+ if: always() && needs.changes.outputs.relevant == 'true'
+ run: ./scripts/jacoco/generate_merged_coverage_report.sh
$GITHUB_WORKSPACE
+ - name: Upload coverage to Codecov
+ if: always() && needs.changes.outputs.relevant == 'true'
+ uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe
# v5
+ with:
+ files: ./jacoco-report.xml
+ disable_search: true
+ flags: integration-tests
+ token: ${{ secrets.CODECOV_TOKEN }}
build-spark-java17:
runs-on: ubuntu-latest
diff --git a/pom.xml b/pom.xml
index f142ebf009b8..292fd806d163 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2339,6 +2339,24 @@
</execution>
</executions>
</plugin>
+ <!-- Attach the JaCoCo agent so the integration-test (failsafe) and
integ-test unit
+ (surefire) runs emit coverage. The agent argument is appended
to the argLine
+ property, which both plugins pick up. destFile matches the
jacoco-agent path
+ that scripts/jacoco/generate_merged_coverage_report.sh globs
for. -->
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+
<destFile>${project.build.directory}/jacoco-agent/${jacoco.agent.dest.filename}</destFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>