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

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-backup.git


The following commit(s) were added to refs/heads/main by this push:
     new ff44dc65 CI: add smoke test for command validation (#84)
ff44dc65 is described below

commit ff44dc65e1f19bd08e819d6a5770434e1bf418f1
Author: Dianjin Wang <[email protected]>
AuthorDate: Thu Apr 9 22:14:24 2026 +0800

    CI: add smoke test for command validation (#84)
    
    Add smoke tests to verify all cloudberry-backup commands (gpbackup,
    gprestore, gpbackup_helper, gpbackup_s3_plugin, gpbackman) can be
    built and executed with --version and --help flags.
    
    - build_and_unit_test.yml: Test from GOPATH/bin after build
    - cloudberry-backup-ci.yml: Test from GPHOME/bin after install
    
    This provides fast feedback on basic functionality before running
    more expensive integration tests.
---
 .github/workflows/build_and_unit_test.yml  | 22 ++++++++++++++++++++++
 .github/workflows/cloudberry-backup-ci.yml | 22 +++++++++++++++++++++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build_and_unit_test.yml 
b/.github/workflows/build_and_unit_test.yml
index d24851a9..cb50de4f 100644
--- a/.github/workflows/build_and_unit_test.yml
+++ b/.github/workflows/build_and_unit_test.yml
@@ -38,6 +38,28 @@ jobs:
         cd ${GOPATH}/src/github.com/apache/cloudberry-backup
         make build
 
+    - name: Smoke Test
+      run: |
+        set -euo pipefail
+        cd ${GOPATH}/src/github.com/apache/cloudberry-backup
+        echo "Running smoke tests..."
+        echo "=== Testing gpbackup ==="
+        ${GOPATH}/bin/gpbackup --version
+        ${GOPATH}/bin/gpbackup --help > /dev/null
+        echo "=== Testing gprestore ==="
+        ${GOPATH}/bin/gprestore --version
+        ${GOPATH}/bin/gprestore --help > /dev/null
+        echo "=== Testing gpbackup_helper ==="
+        ${GOPATH}/bin/gpbackup_helper --version
+        ${GOPATH}/bin/gpbackup_helper --help > /dev/null
+        echo "=== Testing gpbackup_s3_plugin ==="
+        ${GOPATH}/bin/gpbackup_s3_plugin --version
+        ${GOPATH}/bin/gpbackup_s3_plugin --help > /dev/null
+        echo "=== Testing gpbackman ==="
+        ${GOPATH}/bin/gpbackman --version
+        ${GOPATH}/bin/gpbackman --help > /dev/null
+        echo "=== All smoke tests passed ==="
+
     - name: Unit Test
       run: |
         cd ${GOPATH}/src/github.com/apache/cloudberry-backup
diff --git a/.github/workflows/cloudberry-backup-ci.yml 
b/.github/workflows/cloudberry-backup-ci.yml
index b4502e5d..f6b72086 100644
--- a/.github/workflows/cloudberry-backup-ci.yml
+++ b/.github/workflows/cloudberry-backup-ci.yml
@@ -187,7 +187,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        test_target: [unit, integration, end_to_end, s3_plugin_e2e, 
regression, scale]
+        test_target: [smoke, unit, integration, end_to_end, s3_plugin_e2e, 
regression, scale]
 
     steps:
       - name: Free Disk Space
@@ -316,6 +316,26 @@ jobs:
 
             set +e
             case "${TEST_TARGET}" in
+              smoke)
+                set -e
+                echo "Running smoke tests..."
+                echo "=== Testing gpbackup ==="
+                ${GPHOME}/bin/gpbackup --version
+                ${GPHOME}/bin/gpbackup --help > /dev/null
+                echo "=== Testing gprestore ==="
+                ${GPHOME}/bin/gprestore --version
+                ${GPHOME}/bin/gprestore --help > /dev/null
+                echo "=== Testing gpbackup_helper ==="
+                ${GPHOME}/bin/gpbackup_helper --version
+                ${GPHOME}/bin/gpbackup_helper --help > /dev/null
+                echo "=== Testing gpbackup_s3_plugin ==="
+                ${GPHOME}/bin/gpbackup_s3_plugin --version
+                ${GPHOME}/bin/gpbackup_s3_plugin --help > /dev/null
+                echo "=== Testing gpbackman ==="
+                ${GPHOME}/bin/gpbackman --version
+                ${GPHOME}/bin/gpbackman --help > /dev/null
+                echo "=== All smoke tests passed ===" | tee 
"${TEST_LOG_ROOT}/cloudberry-backup-smoke.log"
+                ;;
               unit)
                 make unit 2>&1 | tee 
"${TEST_LOG_ROOT}/cloudberry-backup-unit.log"
                 ;;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to