Skip to content

fix(workflows): unify HugeGraph toolchain's CI#728

Open
peakxy wants to merge 1 commit intoapache:masterfrom
peakxy:toolchain-ci-integration
Open

fix(workflows): unify HugeGraph toolchain's CI#728
peakxy wants to merge 1 commit intoapache:masterfrom
peakxy:toolchain-ci-integration

Conversation

@peakxy
Copy link
Copy Markdown
Contributor

@peakxy peakxy commented Apr 16, 2026

Purpose of the PR

This PR migrates the current repository-local CI jobs in
apache/hugegraph-toolchain to shared reusable workflows hosted in
hugegraph/actions.

The goal is to reduce duplicated GitHub Actions logic across modules while
keeping each module's trigger policy, path filters, compile commands, prepare
commands, and test commands unchanged.

Main Changes

  • Replace the inline CI job definitions in these workflows with thin wrappers:
    • client-ci.yml
    • client-go-ci.yml
    • loader-ci.yml
    • hubble-ci.yml
    • tools-ci.yml
    • spark-connector-ci.yml
  • Route Java-based modules to
    hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master.
  • Route hugegraph-client-go to
    hugegraph/actions/.github/workflows/_toolchain_go_ci_reusable.yml@master.
  • Keep the module-specific compile / prepare / test commands aligned with the
    previous workflows, including the existing HugeGraph commit ids and coverage
    upload behavior.
  • Preserve caller-owned staged Maven settings by continuing to read
    .github/configs/settings.xml from the hugegraph-toolchain repository.
  • Replace the invalid branch regex literal /^release-.*$/ with the supported
    GitHub Actions glob release-*.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • In a fork, temporarily point the wrappers to
      peakxy/hugegraph-actions@<feature-branch> for integration testing.
    • Manually trigger client-ci and confirm the reusable Java workflow keeps
      the original compile and test sequence.
    • Manually trigger client-go-ci and confirm the reusable Go workflow keeps
      the original HugeGraph environment preparation and make test flow.
    • Manually trigger loader-ci and hubble-ci to verify the more complex
      prepare steps still work with the reusable workflow inputs.
    • Push to a release-* branch and confirm the workflow trigger works with
      the updated branch filter.
    • Confirm settings.xml is still read from
      .github/configs/settings.xml in the caller repository.

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (GitHub Actions workflow structure for Toolchain CI)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

Copilot AI review requested due to automatic review settings April 16, 2026 15:04
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ci Continuous integration labels Apr 16, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates HugeGraph toolchain module CI workflows from inline job definitions to shared reusable workflows hosted in hugegraph/actions, aiming to reduce duplication while preserving module-specific triggers and commands.

Changes:

  • Replaced module CI job steps with calls to _toolchain_java_ci_reusable.yml / _toolchain_go_ci_reusable.yml, passing compile/prepare/test commands as inputs.
  • Updated the release branch filter from an invalid regex-like literal to the supported glob release-*.
  • Kept staged Maven settings usage by passing .github/configs/settings.xml into the reusable workflows, and preserved Codecov file paths.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/client-ci.yml Wraps Java client CI into the shared reusable Java workflow with module-specific commands and Codecov path.
.github/workflows/client-go-ci.yml Wraps Go client CI into the shared reusable Go workflow, preserving HugeGraph setup and make test flow.
.github/workflows/hubble-ci.yml Wraps Hubble CI into the shared reusable Java workflow, including Python setup and multi-step prepare/test commands.
.github/workflows/loader-ci.yml Wraps Loader CI into the shared reusable Java workflow, including Hadoop/MySQL setup and multiple Maven test profiles.
.github/workflows/spark-connector-ci.yml Wraps Spark connector CI into the shared reusable Java workflow with module-specific build/test commands.
.github/workflows/tools-ci.yml Wraps Tools CI into the shared reusable Java workflow, preserving HugeGraph install and FuncTestSuite execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/jacoco.xml
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@0123456789abcdef0123456789abcdef01234567

Copilot uses AI. Check for mistakes.
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/site/jacoco/*.xml
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@<FULL_LENGTH_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
cd hugegraph-client-go && make test
uses: hugegraph/actions/.github/workflows/_toolchain_go_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_go_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_go_ci_reusable.yml@<FULL_40_CHAR_REVIEWED_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/jacoco.xml
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@<FULL_LENGTH_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
Comment on lines 3 to +7
on:
push:
branches:
- master
- /^release-.*$/
- release-*
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/verification notes mention manually triggering client-go-ci, but this workflow currently has no workflow_dispatch trigger (only push/pull_request). Either add workflow_dispatch: (if manual runs are intended) or update the PR description to match the actual trigger policy.

Copilot uses AI. Check for mistakes.
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/jacoco.xml
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@<FULL_40_CHAR_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
run: |
cd hugegraph-spark-connector && ls
mvn test
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced via a moving branch (@master). This is a supply-chain risk because changes in hugegraph/actions can alter CI behavior without review in this repo. Pin the reusable workflow to an immutable ref (tag or commit SHA) and update it intentionally when needed.

Suggested change
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@master
uses: hugegraph/actions/.github/workflows/_toolchain_java_ci_reusable.yml@<FULL_LENGTH_COMMIT_SHA>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants