Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/pd-store-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,30 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end

- name: Check startup test prerequisites (PD)
id: pd-preflight
run: |
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "can_run=false" >> "$GITHUB_OUTPUT"
echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
exit 0
fi
done
echo "can_run=true" >> "$GITHUB_OUTPUT"

- name: Run start-hugegraph-pd.sh foreground mode tests
if: steps.pd-preflight.outputs.can_run == 'true'
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
PD_DIR=hugegraph-pd/apache-hugegraph-pd-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-pd.sh $PD_DIR

- name: Startup tests skipped (missing prerequisites)
if: steps.pd-preflight.outputs.can_run == 'false'
run: |
echo "::notice::PD startup tests skipped — ${{ steps.pd-preflight.outputs.skip_reason }}"

- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
Expand Down Expand Up @@ -169,12 +187,36 @@ jobs:
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end

- name: Check startup test prerequisites (Store)
id: store-preflight
run: |
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "can_run=false" >> "$GITHUB_OUTPUT"
echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
exit 0
fi
done
LIMIT_N=$(ulimit -n)
if [[ "$LIMIT_N" != "unlimited" ]] && (( LIMIT_N < 1024 )); then
echo "can_run=false" >> "$GITHUB_OUTPUT"
echo "skip_reason=ulimit -n is $LIMIT_N (store requires >= 1024)" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "can_run=true" >> "$GITHUB_OUTPUT"

- name: Run start-hugegraph-store.sh foreground mode tests
if: steps.store-preflight.outputs.can_run == 'true'
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
STORE_DIR=hugegraph-store/apache-hugegraph-store-$VERSION/
$TRAVIS_DIR/test-start-hugegraph-store.sh $STORE_DIR

- name: Startup tests skipped (missing prerequisites)
if: steps.store-preflight.outputs.can_run == 'false'
run: |
echo "::notice::Store startup tests skipped — ${{ steps.store-preflight.outputs.skip_reason }}"

- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,32 @@ jobs:
run: |
mvn clean compile -U -Dmaven.javadoc.skip=true -ntp

- name: Run start-hugegraph.sh foreground mode tests
- name: Check startup test prerequisites
id: server-preflight
if: ${{ env.BACKEND == 'rocksdb' }}
run: |
for tool in lsof crontab curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "can_run=false" >> "$GITHUB_OUTPUT"
echo "skip_reason=missing tool: $tool" >> "$GITHUB_OUTPUT"
exit 0
fi
done
echo "can_run=true" >> "$GITHUB_OUTPUT"

- name: Run start-hugegraph.sh foreground mode tests
if: ${{ env.BACKEND == 'rocksdb' && steps.server-preflight.outputs.can_run == 'true' }}
run: |
mvn package -Dmaven.test.skip=true -pl hugegraph-server/hugegraph-dist -am -ntp
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
SERVER_DIR=hugegraph-server/apache-hugegraph-server-$VERSION/
$TRAVIS_DIR/test-start-hugegraph.sh $SERVER_DIR

- name: Startup tests skipped (missing prerequisites)
if: ${{ env.BACKEND == 'rocksdb' && steps.server-preflight.outputs.can_run == 'false' }}
run: |
echo "::notice::Server startup tests skipped — ${{ steps.server-preflight.outputs.skip_reason }}"

- name: Run unit test
run: |
$TRAVIS_DIR/run-unit-test.sh $BACKEND
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fi
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
exit 0
exit 77
fi
done

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fi
for tool in lsof curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
exit 0
exit 77
fi
done

Expand All @@ -122,7 +122,7 @@ LIMIT_N=$(ulimit -n)
if [[ "$LIMIT_N" != "unlimited" ]]; then
if (( LIMIT_N < 1024 )); then
echo "SKIP: ulimit -n is $LIMIT_N — store requires >= 1024. Run: ulimit -n 1024"
exit 0
exit 77
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fi
for tool in lsof crontab curl java; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "SKIP: required tool '$tool' not found — skipping test suite"
exit 0
exit 77
fi
done

Expand Down
Loading