Skip to content

Commit

Permalink
refactor: enhance the logic for client-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin committed Oct 11, 2024
1 parent 1010a56 commit c2cb2d5
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,44 @@ jobs:
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)
COMMIT_ID: f6f3708
# hugegraph commit date: 2024-10-10
COMMIT_ID: 29ecc0
strategy:
fail-fast: false
matrix:
JAVA_VERSION: [ '8' ]

steps:
- name: Install JDK 11 for server environment
uses: actions/setup-java@v3
- name: Fetch code
uses: actions/checkout@v4
with:
java-version: 11
distribution: 'zulu'
fetch-depth: 2

# TODO: do we need it? (need test)
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: Checkout
uses: actions/checkout@v3
- name: Install JDK 11 for graph server
uses: actions/setup-java@v4
with:
fetch-depth: 2
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' }}
Expand All @@ -59,16 +74,6 @@ jobs:
run: |
mvn -e compile -pl hugegraph-client -Dmaven.javadoc.skip=true -ntp
- 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@v3
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'zulu'

- name: Run test
run: |
cd hugegraph-client && ls *
Expand Down

0 comments on commit c2cb2d5

Please sign in to comment.