-
Notifications
You must be signed in to change notification settings - Fork 93
102 lines (91 loc) · 2.82 KB
/
hubble-ci.yml
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
92
93
94
95
96
97
98
99
100
101
102
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
# TODO: replace it with the (latest - n) commit id (n >= 15)
COMMIT_ID: 6a4041e
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
steps:
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
# we also should cache python & yarn & downloads to avoid useless work
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: use staged maven repo settings
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 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
run: |
sudo pip install -r ${TRAVIS_DIR}/requirements.txt
cd hugegraph-hubble
mvn package -Dmaven.test.skip=true
cd apache-hugegraph-hubble-incubating*
cd bin
./start-hubble.sh -d
./stop-hubble.sh
cd ../../../
pwd
$TRAVIS_DIR/install-hugegraph.sh $COMMIT_ID
- name: Unit test
run: mvn test -P unit-test -pl hugegraph-hubble/hubble-be -ntp
- name: API test
env:
CI: false
run: |
cd hugegraph-hubble && ls
hubble-dist/assembly/travis/run-api-test.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/site/jacoco/*.xml