-
Notifications
You must be signed in to change notification settings - Fork 109
91 lines (80 loc) · 2.52 KB
/
client-ci.yml
File metadata and controls
91 lines (80 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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-latest
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: 2025-11-4
COMMIT_ID: b7998c1
strategy:
fail-fast: false
matrix:
# released pd package is compiled in version 55.0, which requires java 11 to use
JAVA_VERSION: [ '11' ]
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: |
# TODO(@Thespica): test both servers of supporting gs and not supporting gs
# when the server supports gs
$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