This is an automated email from the ASF dual-hosted git repository.

hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new 85d73ca48 ci(java): add Java coverage baseline to post-merge workflow 
(#2707)
85d73ca48 is described below

commit 85d73ca48b2a4155e8e5bd300f352db3fdc2fdb2
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Tue Feb 10 08:39:00 2026 +0100

    ci(java): add Java coverage baseline to post-merge workflow (#2707)
    
    Codecov needs a base report from master for accurate PR diffs.
    Add java-coverage job to post-merge.yml mirroring the Rust
    pattern, rename coverage to rust-coverage, and configure
    flag_management in codecov.yml with carryforward enabled.
---
 .github/workflows/post-merge.yml | 47 ++++++++++++++++++++++++++++++++++++++--
 codecov.yml                      | 20 +++++++++++++++++
 2 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index 8479907e3..e1f4ceecc 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -175,8 +175,8 @@ jobs:
       version: edge
       upload_artifacts: true
 
-  coverage:
-    name: Coverage baseline
+  rust-coverage:
+    name: Rust coverage baseline
     runs-on: ubuntu-latest
     timeout-minutes: 45
     steps:
@@ -228,6 +228,49 @@ jobs:
           flags: rust
           fail_ci_if_error: false
 
+  java-coverage:
+    name: Java coverage baseline
+    runs-on: ubuntu-latest
+    timeout-minutes: 30
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Setup Java with cache
+        uses: ./.github/actions/utils/setup-java-with-cache
+
+      - name: Setup Rust with cache
+        uses: ./.github/actions/utils/setup-rust-with-cache
+        with:
+          save-cache: "false"
+
+      - name: Start Iggy server
+        id: iggy
+        uses: ./.github/actions/utils/server-start
+
+      - name: Run tests and generate coverage
+        working-directory: foreign/java
+        env:
+          USE_EXTERNAL_SERVER: true
+        run: |
+          ./gradlew test
+          ./gradlew jacocoAggregatedReport
+
+      - name: Stop Iggy server
+        if: always()
+        uses: ./.github/actions/utils/server-stop
+        with:
+          pid-file: ${{ steps.iggy.outputs.pid_file }}
+          log-file: ${{ steps.iggy.outputs.log_file }}
+
+      - name: Upload to Codecov
+        uses: codecov/codecov-action@v5
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          files: 
foreign/java/build/reports/jacoco/aggregate/jacocoAggregated.xml
+          disable_search: true
+          flags: java
+          fail_ci_if_error: false
+
   create-prerelease:
     name: Create edge pre-release
     runs-on: ubuntu-latest
diff --git a/codecov.yml b/codecov.yml
index 1926f1853..2e0bf7962 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -34,6 +34,26 @@ coverage:
         target: 50%
         threshold: 5%
 
+flag_management:
+  default_rules:
+    carryforward: true
+    statuses:
+      - type: project
+        target: auto
+        threshold: 1%
+        informational: true
+      - type: patch
+        target: 50%
+        threshold: 5%
+        informational: true
+  individual_flags:
+    - name: rust
+      paths:
+        - core/
+    - name: java
+      paths:
+        - foreign/java/
+
 comment:
   layout: "header, diff, flags, files"
   behavior: default

Reply via email to