forked from vesoft-inc/nebula-clients
-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (117 loc) · 3.62 KB
/
all_test.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Test all client
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
java-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache the Maven packages to speed up build
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: start nebula-graph
run: |
mkdir tmp
pushd tmp
git clone -b v2-preview https://github.com/vesoft-inc/nebula-docker-compose.git
pushd nebula-docker-compose/
sed -i '0,/\- 3699/s/\- 3699/\- "3700:3699"/' docker-compose.yaml
sed -i '0,/\- 3699/s/\- 3699/\- "3701:3699"/' docker-compose.yaml
docker-compose up -d
sleep 10
popd
popd
- name: Build with Maven
run: mvn -B package --file java/pom.xml
python-client:
runs-on: ubuntu-18.04
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install django-import-export future futures six gevent prettytable pytest
- name: Test with pytest
run: |
mkdir tmp
pushd tmp
git clone -b v2-preview https://github.com/vesoft-inc/nebula-docker-compose.git
pushd nebula-docker-compose/
sed -i '0,/\- 3699/s/\- 3699/\- "3700:3699"/' docker-compose.yaml
sed -i '0,/\- 3699/s/\- 3699/\- "3701:3699"/' docker-compose.yaml
docker-compose up -d
sleep 10
popd
popd
cd python/tests
pytest -s -v
go-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: '1.13'
- name: Test with GO test
run: |
mkdir tmp
pushd tmp
git clone -b v2-preview https://github.com/vesoft-inc/nebula-docker-compose.git
pushd nebula-docker-compose/
sed -i '0,/\- 3699/s/\- 3699/\- "3710:3699"/' docker-compose.yaml
sed -i '0,/\- 3699/s/\- 3699/\- "3701:3699"/' docker-compose.yaml
docker-compose up -d
sleep 10
popd
popd
cd go
go test -v -race
nodejs-client:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: run test
run: |
# TODO: make it to an action
mkdir tmp
pushd tmp
git clone -b v2-preview https://github.com/vesoft-inc/nebula-docker-compose.git
pushd nebula-docker-compose/
sed -i '0,/\- 3699/s/\- 3699/\- "3700:3699"/' docker-compose.yaml
sed -i '0,/\- 3699/s/\- 3699/\- "3701:3699"/' docker-compose.yaml
docker-compose up -d
sleep 10
popd
popd
cd node
npm install
npm run build --if-present
npm test