-
Notifications
You must be signed in to change notification settings - Fork 41
107 lines (88 loc) · 2.98 KB
/
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
103
104
105
106
107
name: "hugegraph-computer ci"
on:
push:
branches:
- master
- /^release-.*$/
pull_request:
jobs:
computer-ci:
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: computer-dist/src/assembly/travis
KUBERNETES_VERSION: 1.20.1
# TODO: update it before release
HUGEGRAPH_SERVER_COMMIT_ID: d01c8737d7d5909119671953521f1401dcd1a188
BSP_ETCD_URL: http://localhost:2579
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install JDK 8 for HDFS
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
- name: License check(RAT)
run: |
mvn apache-rat:check -ntp
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt
grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt
- name: Setup Python3
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Cache HDFS packages
uses: actions/cache@v3
id: hdfs-cache
with:
path: ~/hadoop-3.3.2.tar.gz
key: ${{ runner.os }}--hadoop
restore-keys: ${{ runner.os }}-hadoop
- name: Download HDFS
if: steps.hdfs-cache.outputs.cache-hit != 'true'
run: wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz -O ~/hadoop-3.3.2.tar.gz
- name: Setup HDFS
run: $TRAVIS_DIR/install-hdfs.sh
- name: Setup Minikube-Kubernetes
run: $TRAVIS_DIR/install-k8s.sh
- name: Check Component
run: |
sleep 5
curl localhost:9000
kubectl get nodes
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Prepare env and service
run: |
$TRAVIS_DIR/install-env.sh
# TODO: use docker image to replace it
$TRAVIS_DIR/install-hugegraph-from-source.sh $HUGEGRAPH_SERVER_COMMIT_ID
$TRAVIS_DIR/load-data-into-hugegraph.sh
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- 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 clean compile -Dmaven.javadoc.skip=true -ntp
- name: Integrate test
run: mvn test -P integrate-test -ntp
- name: Unit test
run: mvn test -P unit-test -ntp
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/site/jacoco/jacoco.xml