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

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

commit 9788abefb6acc2021dbe2f37d19f2290b6a80390
Author: remilu <[email protected]>
AuthorDate: Mon Oct 26 20:56:10 2026 +0800

    [#14222] ci(tms): Wire TMS Test into Fork CI like idp-basic
    
    Make tms-test a workflow_call suite with checkout-and-sync, register it
    in fork-ci.yml / required_ci, and include it in Fork CI status SUITES.
    
    Co-authored-by: Cursor <[email protected]>
---
 .github/scripts/fork-ci-status.cjs    |  2 +-
 .github/workflows/fork-ci.yml         | 12 ++++++++++
 .github/workflows/tms-test-action.yml | 29 ++++++++++++++++++++++
 .github/workflows/tms-test.yml        | 45 +++++++++++++++++++++++++++++++----
 4 files changed, 82 insertions(+), 6 deletions(-)

diff --git a/.github/scripts/fork-ci-status.cjs 
b/.github/scripts/fork-ci-status.cjs
index 14e530d936..6d905e88be 100644
--- a/.github/scripts/fork-ci-status.cjs
+++ b/.github/scripts/fork-ci-status.cjs
@@ -16,7 +16,7 @@
 const { TRUSTED_REQUIRED } = require('./publish-ci-status.cjs');
 const UPSTREAM = { owner: 'apache', repo: 'gravitino' };
 const SUITES = ['build', 'backend', 'spark', 'flink', 'trino', 
'iceberg_rest_trino', 'python',
-  'frontend', 'access_control', 'idp_basic', 'mcp', 'maintenance', 'web_ui', 
'charts',
+  'frontend', 'access_control', 'idp_basic', 'mcp', 'maintenance', 'tms', 
'web_ui', 'charts',
   'contrib_catalog', 'asf_allowlist'];
 // The fail-fast watcher in fork-ci.yml never fails the run 
(continue-on-error), but runs that
 // started before that change can still fail on the watcher's own API errors.
diff --git a/.github/workflows/fork-ci.yml b/.github/workflows/fork-ci.yml
index a76ba34227..2ee45f792f 100644
--- a/.github/workflows/fork-ci.yml
+++ b/.github/workflows/fork-ci.yml
@@ -211,6 +211,17 @@ jobs:
       sync: ${{ needs.eligibility.outputs.sync }}
     uses: ./.github/workflows/maintenance-integration-test.yml
 
+  tms:
+    needs: eligibility
+    if: needs.eligibility.outputs.valid == 'true'
+    with:
+      base-ref: ${{ needs.eligibility.outputs.base-ref }}
+      base-sha: ${{ needs.eligibility.outputs.base-sha }}
+      head-repository: ${{ needs.eligibility.outputs.head-repository }}
+      head-sha: ${{ needs.eligibility.outputs.head-sha }}
+      sync: ${{ needs.eligibility.outputs.sync }}
+    uses: ./.github/workflows/tms-test.yml
+
   web_ui:
     needs: eligibility
     if: needs.eligibility.outputs.valid == 'true'
@@ -295,6 +306,7 @@ jobs:
       - idp_basic
       - mcp
       - maintenance
+      - tms
       - web_ui
       - charts
       - contrib_catalog
diff --git a/.github/workflows/tms-test-action.yml 
b/.github/workflows/tms-test-action.yml
index ac81715d40..72a3dd201e 100644
--- a/.github/workflows/tms-test-action.yml
+++ b/.github/workflows/tms-test-action.yml
@@ -3,6 +3,26 @@ name: TMS Test Action
 on:
   workflow_call:
     inputs:
+      base-ref:
+        type: string
+        required: false
+        default: ''
+      base-sha:
+        type: string
+        required: false
+        default: ''
+      head-repository:
+        type: string
+        required: false
+        default: ''
+      head-sha:
+        type: string
+        required: false
+        default: ''
+      sync:
+        type: string
+        required: false
+        default: ''
       java-version:
         required: true
         description: 'Java version'
@@ -15,6 +35,15 @@ jobs:
     timeout-minutes: 45
     steps:
       - uses: actions/checkout@v4
+        with:
+          persist-credentials: false
+      - uses: ./.github/actions/checkout-and-sync
+        with:
+          base-ref: ${{ inputs.base-ref }}
+          base-sha: ${{ inputs.base-sha }}
+          head-repository: ${{ inputs.head-repository }}
+          head-sha: ${{ inputs.head-sha }}
+          sync: ${{ inputs.sync }}
 
       - uses: actions/setup-java@v4
         with:
diff --git a/.github/workflows/tms-test.yml b/.github/workflows/tms-test.yml
index fb4c9f3daf..3c2d338501 100644
--- a/.github/workflows/tms-test.yml
+++ b/.github/workflows/tms-test.yml
@@ -1,14 +1,32 @@
 name: TMS Test
 
 on:
-  push:
-    branches: ["main", "branch-*"]
-  pull_request:
-    branches: ["main", "branch-*"]
+  workflow_call:
+    inputs:
+      base-ref:
+        type: string
+        required: false
+        default: ''
+      base-sha:
+        type: string
+        required: false
+        default: ''
+      head-repository:
+        type: string
+        required: false
+        default: ''
+      head-sha:
+        type: string
+        required: false
+        default: ''
+      sync:
+        type: string
+        required: false
+        default: ''
   workflow_dispatch:
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.ref }}
+  group: fork-ci-tms-${{ inputs.head-sha || github.ref }}
   cancel-in-progress: true
 
 jobs:
@@ -16,11 +34,23 @@ jobs:
     runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v4
+        with:
+          persist-credentials: false
+      - uses: ./.github/actions/checkout-and-sync
+        with:
+          base-ref: ${{ inputs.base-ref }}
+          base-sha: ${{ inputs.base-sha }}
+          head-repository: ${{ inputs.head-repository }}
+          head-sha: ${{ inputs.head-sha }}
+          sync: ${{ inputs.sync }}
+        id: checkout
       - name: Disable Git automatic maintenance
         run: git config --local maintenance.auto false
       - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d
         id: filter
         with:
+          base: ${{ steps.checkout.outputs.synced == 'true' && 
steps.checkout.outputs.base-sha || steps.checkout.outputs.base-ref }}
+          ref: ${{ steps.checkout.outputs.synced == 'true' && 
steps.checkout.outputs.head-sha || github.ref }}
           filters: |
             source_changes:
               - plugins/maintenance/**
@@ -56,4 +86,9 @@ jobs:
     if: needs.changes.outputs.source_changes == 'true' && 
needs.changes.outputs.module_exists == 'true'
     uses: ./.github/workflows/tms-test-action.yml
     with:
+      base-ref: ${{ inputs.base-ref }}
+      base-sha: ${{ inputs.base-sha }}
+      head-repository: ${{ inputs.head-repository }}
+      head-sha: ${{ inputs.head-sha }}
+      sync: ${{ inputs.sync }}
       java-version: '17'

Reply via email to