feat(client): support graphspace #821
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "java-client-ci" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- /^release-.*$/ | |
paths: | |
- hugegraph-client/** | |
- hugegraph-dist/** | |
- .github/workflows/** | |
- pom.xml | |
pull_request: | |
paths: | |
- hugegraph-client/** | |
- hugegraph-dist/** | |
- .github/workflows/** | |
- pom.xml | |
jobs: | |
client-ci: | |
runs-on: ubuntu-20.04 | |
env: | |
USE_STAGE: 'true' # Whether to include the stage repository. | |
TRAVIS_DIR: hugegraph-client/assembly/travis | |
# TODO: replace it with the (latest - n) commit id (n >= 15) | |
# hugegraph commit date: 2024-10-10 | |
COMMIT_ID: 29ecc0 | |
strategy: | |
fail-fast: false | |
matrix: | |
JAVA_VERSION: [ '8' ] | |
steps: | |
- name: Fetch code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
# TODO: do we need it? (need test) | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Install JDK 11 for graph server | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Prepare env and service | |
run: | | |
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID | |
- name: Install Java ${{ matrix.JAVA_VERSION }} for client | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.JAVA_VERSION }} | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Use staged maven repo | |
if: ${{ env.USE_STAGE == 'true' }} | |
run: | | |
cp $HOME/.m2/settings.xml /tmp/settings.xml | |
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
- name: Compile | |
run: | | |
mvn -e compile -pl hugegraph-client -Dmaven.javadoc.skip=true -ntp | |
- name: Run test | |
run: | | |
cd hugegraph-client && ls * | |
mvn test -Dtest=UnitTestSuite -ntp | |
mvn test -Dtest=ApiTestSuite | |
mvn test -Dtest=FuncTestSuite | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: target/jacoco.xml |