Skip to content

feat(hubble): modernize graph workbench experience #1426

feat(hubble): modernize graph workbench experience

feat(hubble): modernize graph workbench experience #1426

Workflow file for this run

name: "hubble-ci"
on:
workflow_dispatch:
push:
branches:
- master
- 'release-*'
paths:
- hugegraph-hubble/**
- hugegraph-dist/**
- hugegraph-loader/**
- .github/workflows/**
- pom.xml
pull_request:
paths:
- hugegraph-hubble/**
- hugegraph-dist/**
- hugegraph-loader/**
- hugegraph-client/**
- .github/workflows/**
- pom.xml
env:
TRAVIS_DIR: hugegraph-hubble/hubble-dist/assembly/travis
HUGEGRAPH_SERVER_COMMIT: 99936be5f41fccd193f120e01206e3cf3c73a050
HUGEGRAPH_SERVER_FETCH_REF: refs/heads/master
jobs:
hubble-ci:
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.
STATIC_DIR: hugegraph-hubble/hubble-dist/assembly/static
strategy:
matrix:
JAVA_VERSION: ['11']
python-version: ["3.11"]
steps:
- name: Fetch Code
uses: actions/checkout@v7
with:
fetch-depth: 2
- name: Setup Java environment
uses: ./.github/actions/setup-java-env
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'temurin'
use-stage: ${{ env.USE_STAGE }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Set up Node.js 18.20.8
uses: actions/setup-node@v6
with:
node-version: '18.20.8'
# we also should cache python & yarn & downloads to avoid useless work
- name: Cache Maven packages
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v6
with:
path: |
hugegraph-hubble/hubble-fe/node_modules
hugegraph-hubble/hubble-fe/node
~/.cache/yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json', '**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Playwright browsers
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('hugegraph-hubble/hubble-fe/yarn.lock') }}
- name: Cache HugeGraph Server
uses: actions/cache@v6
with:
path: ~/hugegraph-cache-${{ env.HUGEGRAPH_SERVER_COMMIT }}
key: ${{ runner.os }}-hugegraph-server-${{ env.HUGEGRAPH_SERVER_COMMIT }}
- name: Frontend i18n check
working-directory: hugegraph-hubble/hubble-fe
env:
NODE_OPTIONS: --max-old-space-size=4096
run: |
yarn install --frozen-lockfile --network-timeout 600000 --prefer-offline --ignore-engines
yarn lint
yarn i18n:check
node --test ../hubble-dist/assembly/travis/ui_auth.test.js
- name: Install Playwright Chromium
working-directory: hugegraph-hubble/hubble-fe
run: yarn playwright install --with-deps chromium
- name: Compile
run: |
mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip=true -DskipTests -ntp
cd hugegraph-hubble && ls *
mvn -e compile -Dmaven.javadoc.skip=true -ntp
- name: Prepare env and service
env:
COMMIT_ID: ${{ env.HUGEGRAPH_SERVER_COMMIT }}
COMMIT_REF: ${{ env.HUGEGRAPH_SERVER_FETCH_REF }}
NODE_OPTIONS: --max-old-space-size=4096
run: |
echo "=== Environment Info ==="
node -v
yarn -v
echo "NODE_OPTIONS: $NODE_OPTIONS"
echo "COMMIT_ID: $COMMIT_ID"
echo "COMMIT_REF: $COMMIT_REF"
free -h || true
echo "======================="
python -m pip install -r ${TRAVIS_DIR}/requirements.txt
cd hugegraph-hubble
mvn package -Dmaven.test.skip=true
cd apache-hugegraph-hubble-*
cd bin
./start-hubble.sh -d
./stop-hubble.sh
cd ../../../
pwd
$TRAVIS_DIR/install-hugegraph.sh $COMMIT_ID $COMMIT_REF
- name: Release package audit
env:
GNUPGHOME: ${{ runner.temp }}/hubble-release-gate-gpghome
run: |
HUBBLE_TARBALL="$(ls hugegraph-hubble/target/apache-hugegraph-hubble-*.tar.gz | head -n 1)"
if [[ -z "${HUBBLE_TARBALL}" ]]; then
echo "Hubble tarball not found" >&2
exit 1
fi
mkdir -p "${GNUPGHOME}"
chmod 700 "${GNUPGHOME}"
shasum -a 512 "${HUBBLE_TARBALL}" > "${HUBBLE_TARBALL}.sha512"
printf '%s\n' \
'%no-protection' \
'Key-Type: RSA' \
'Key-Length: 2048' \
'Subkey-Type: RSA' \
'Subkey-Length: 2048' \
'Name-Real: Hubble CI Release Gate' \
'Name-Email: hubble-ci-release-gate@example.invalid' \
'Expire-Date: 0' \
'%commit' \
> "${RUNNER_TEMP}/hubble-release-gate-key.conf"
gpg --batch --generate-key "${RUNNER_TEMP}/hubble-release-gate-key.conf"
gpg --batch --yes --armor --detach-sign "${HUBBLE_TARBALL}"
bash "${TRAVIS_DIR}/check-hubble-dist.sh" "${HUBBLE_TARBALL}" \
--require-sidecars \
--json-output hugegraph-hubble/target/hubble-dist-check.json
- name: Unit test
run: mvn test -P unit-test -pl hugegraph-hubble/hubble-be -ntp
- name: API test
run: |
cd hugegraph-hubble
HUBBLE_TARBALL="$(ls target/apache-hugegraph-hubble-*.tar.gz | head -n 1)"
HUBBLE_694_EVIDENCE_DIR=target/hubble-live-acceptance \
hubble-dist/assembly/travis/verify-hubble-issue-694.sh \
"${HUBBLE_TARBALL}" http://127.0.0.1:8080
- name: Upload Hubble smoke evidence
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: hubble-smoke-java-${{ matrix.JAVA_VERSION }}-${{ github.run_attempt }}
path: |
hugegraph-hubble/target/hubble-dist-check.json
hugegraph-hubble/target/hubble-live-acceptance/**/*.json
hugegraph-hubble/target/hubble-live-acceptance/**/*.png
hugegraph-hubble/target/hubble-live-acceptance/**/*.log
if-no-files-found: warn
retention-days: 14
- name: Upload coverage to Codecov
uses: ./.github/actions/upload-coverage
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/site/jacoco/*.xml