Repository navigation
118 lines (103 loc) · 3.31 KB
/
Copy pathcomputer-ci.yml
File metadata and controls
118 lines (103 loc) · 3.31 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: "Computer CI"
on:
push:
branches:
- master
- release-*
paths:
- .gitattributes
- computer/**
- .github/workflows/computer-ci.yml
pull_request:
paths:
- .gitattributes
- computer/**
- .github/workflows/computer-ci.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: computer
jobs:
computer-ci:
name: computer-ci (server ${{ matrix.server }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
server: ['1.7.0', 'latest']
env:
TRAVIS_DIR: computer-dist/src/assembly/travis
BSP_ETCD_URL: http://localhost:2579
KUBERNETES_VERSION: 1.20.1
GRAPH_ENV_VERSION: ${{ matrix.server }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-jdk17-m2-${{ hashFiles('computer/**/pom.xml') }}
restore-keys: ${{ runner.os }}-jdk17-m2-
- name: License check(RAT)
run: |
pwd
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@v5
with:
python-version: '3.8'
- name: Setup HDFS
run: '"$TRAVIS_DIR/install-hdfs.sh"'
- name: Setup Minikube-Kubernetes
run: '"$TRAVIS_DIR/install-k8s.sh"'
- name: Check Component
run: |
docker exec hugegraph-ci-hdfs-namenode hdfs dfs -ls /dataset
kubectl get nodes
- name: Prepare env and service
run: |
"$TRAVIS_DIR/install-env.sh"
"$TRAVIS_DIR/load-data-into-hugegraph.sh" "$GRAPH_ENV_VERSION"
docker inspect --format '{{.Config.Image}} {{.Image}}' graph
curl -fsS --max-time 10 http://localhost:8080/versions | tee /tmp/hugegraph-ci-versions.json
jq -e --arg tag "$GRAPH_ENV_VERSION" '
.versions.core | select(type == "string" and length > 0 and ($tag == "latest" or . == $tag))
' /tmp/hugegraph-ci-versions.json
- name: Compile
run: mvn clean compile -e -Dmaven.javadoc.skip=true -ntp
- name: Integrate test
timeout-minutes: 10
run: |
(
sleep 180
jps -l | while read -r pid main; do
case "$main" in
*surefirebooter*|org.apache.maven.surefire.booter.ForkedBooter)
jcmd "$pid" Thread.print -l
;;
esac
done
) &
diagnostics_pid=$!
trap 'kill "$diagnostics_pid" 2>/dev/null || true' EXIT
mvn test -P integrate-test -ntp
- name: Unit test
timeout-minutes: 15
run: mvn test -P unit-test -ntp
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: computer/target/site/jacoco/jacoco.xml