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

fanng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new a04ef143ee [#10611] improve(ci): Add GitHub Actions integration test 
workflow for the maintenance module (#10612)
a04ef143ee is described below

commit a04ef143eefa5be8fe38a2310a44c51c3ba72ee0
Author: MaSai <[email protected]>
AuthorDate: Wed Apr 1 20:13:41 2026 +0800

    [#10611] improve(ci): Add GitHub Actions integration test workflow for the 
maintenance module (#10612)
    
    ### What changes were proposed in this pull request?
    Adds two GitHub Actions workflow files for the maintenance module,
    following the same pattern as the existing
    flink-integration-test*.yml:
    
    - .github/workflows/maintenance-integration-test.yml — trigger workflow
    that fires on push/pull_request to main /
    branch-*. Uses dorny/paths-filter to skip runs when no relevant files
    have changed. Triggers on changes to
    maintenance/** as well as shared modules (api/**, core/**, server/**,
    catalogs/**, etc.).
    - .github/workflows/maintenance-integration-test-action.yml — reusable
    workflow_call action. Checks out the repo,
    sets up JDK 17 (Temurin), builds the full distribution, frees disk
    space, then runs :maintenance:optimizer:test in
    both embedded and deploy modes with -PskipDockerTests=false. On failure
    (or when the upload log label is present),
    uploads test reports and logs as artifacts.
    ### Why are the changes needed?
    The maintenance module contains integration tests under
    org.apache.gravitino.maintenance.optimizer.integration.test.** but had
    no CI workflow to execute them. Without CI,
    regressions in the maintenance module (optimizer, updaters, jobs) could
    go undetected on push or pull request.
    
    Fix: https://github.com/apache/gravitino/issues/10611
    ### Does this PR introduce any user-facing change?
    No. This is a CI-only change adding new workflow files. No APIs,
    configuration keys, or runtime behaviour are
    affected.
    ### How was this patch tested?
    Workflow syntax validated locally. The action follows the same structure
    as the proven
    flink-integration-test-action.yml. Integration tests under
    :maintenance:optimizer pass when run locally with:
    
     ./gradlew -PskipDockerTests=false :maintenance:optimizer:test \
    --tests "org.apache.gravitino.maintenance.optimizer.integration.test.**"
---
 .../maintenance-integration-test-action.yml        | 64 ++++++++++++++++++++
 .github/workflows/maintenance-integration-test.yml | 70 ++++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/.github/workflows/maintenance-integration-test-action.yml 
b/.github/workflows/maintenance-integration-test-action.yml
new file mode 100644
index 0000000000..c9829cf54b
--- /dev/null
+++ b/.github/workflows/maintenance-integration-test-action.yml
@@ -0,0 +1,64 @@
+name: Maintenance Integration Test Action
+
+# run maintenance integration test
+on:
+  workflow_call:
+    inputs:
+      architecture:
+        required: true
+        description: 'Architecture of the platform'
+        type: string
+      java-version:
+        required: true
+        description: 'Java version'
+        type: string
+
+jobs:
+  start-runner:
+    name: JDK${{ inputs.java-version }}
+    runs-on: ubuntu-latest
+    timeout-minutes: 60
+    env:
+      PLATFORM: ${{ inputs.architecture }}
+    steps:
+      - uses: actions/checkout@v4
+
+      - uses: actions/setup-java@v4
+        with:
+          java-version: ${{ inputs.java-version }}
+          distribution: 'temurin'
+          cache: 'gradle'
+
+      - name: Set up QEMU
+        uses: 
docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
+
+      - name: Check required command
+        run: |
+          dev/ci/check_commands.sh
+
+      - name: Package Gravitino
+        run: |
+          ./gradlew compileDistribution -x test
+
+      - name: Free up disk space
+        run: |
+          dev/ci/util_free_space.sh
+
+      - name: Maintenance Integration Test
+        id: integrationTest
+        # run embedded mode and deploy mode integration tests
+        run: |
+          ./gradlew -PskipTests -PtestMode=embedded -PskipDockerTests=false 
:maintenance:optimizer:test --tests 
"org.apache.gravitino.maintenance.optimizer.integration.test.**"
+          ./gradlew -PskipTests -PtestMode=deploy -PskipDockerTests=false 
:maintenance:optimizer:test --tests 
"org.apache.gravitino.maintenance.optimizer.integration.test.**"
+
+      - name: Upload integrate tests reports
+        uses: actions/upload-artifact@v7
+        if: ${{ (failure() && steps.integrationTest.outcome == 'failure') || 
contains(github.event.pull_request.labels.*.name, 'upload log') }}
+        with:
+          name: maintenance-integrate-test-reports-${{ inputs.java-version }}
+          path: |
+            build/reports
+            maintenance/optimizer/build/*.log
+            maintenance/optimizer/build/*.tar
+            distribution/package/logs/gravitino-server.out
+            distribution/package/logs/gravitino-server.log
diff --git a/.github/workflows/maintenance-integration-test.yml 
b/.github/workflows/maintenance-integration-test.yml
new file mode 100644
index 0000000000..034fa79972
--- /dev/null
+++ b/.github/workflows/maintenance-integration-test.yml
@@ -0,0 +1,70 @@
+name: Maintenance Integration Test
+
+# Controls when the workflow will run
+on:
+  push:
+    branches: [ "main", "branch-*" ]
+  pull_request:
+    branches: [ "main", "branch-*" ]
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  changes:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
+        id: filter
+        with:
+          filters: |
+            source_changes:
+              - .github/**
+              - api/**
+              - bin/**
+              - catalogs/catalog-common/**
+              - clients/client-java/**
+              - clients/client-java-runtime/**
+              - common/**
+              - conf/**
+              - core/**
+              - dev/**
+              - gradle/**
+              - integration-test-common/**
+              - maintenance/**
+              - meta/**
+              - scripts/**
+              - server/**
+              - server-common/**
+              - build.gradle.kts
+              - gradle.properties
+              - gradlew
+              - settings.gradle.kts
+    outputs:
+      source_changes: ${{ steps.filter.outputs.source_changes }}
+
+  MaintenanceIT-on-push:
+    needs: changes
+    if: (github.event_name == 'push' && needs.changes.outputs.source_changes 
== 'true')
+    strategy:
+      matrix:
+        architecture: [linux/amd64]
+        java-version: [ 17 ]
+    uses: ./.github/workflows/maintenance-integration-test-action.yml
+    with:
+      architecture: ${{ matrix.architecture }}
+      java-version: ${{ matrix.java-version }}
+
+  MaintenanceIT-on-pr:
+    needs: changes
+    if: (github.event_name == 'pull_request' && 
needs.changes.outputs.source_changes == 'true')
+    strategy:
+      matrix:
+        architecture: [linux/amd64]
+        java-version: [ 17 ]
+    uses: ./.github/workflows/maintenance-integration-test-action.yml
+    with:
+      architecture: ${{ matrix.architecture }}
+      java-version: ${{ matrix.java-version }}

Reply via email to