Skip to content

Commit e97b37c

Browse files
authored
Merge pull request #406 from dyashuni/add_tests_to_ci
Add cpp tests to ci
2 parents 0fc42b0 + 74bf4a3 commit e97b37c

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.github/workflows/build.yml

+32-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: HNSW CI
33
on: [push, pull_request]
44

55
jobs:
6-
test:
6+
test_python:
77
runs-on: ${{matrix.os}}
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, windows-latest]
11-
python-version: ['3.6', '3.7', '3.8', '3.9']
11+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v4
1515
with:
1616
python-version: ${{ matrix.python-version }}
1717

@@ -20,3 +20,31 @@ jobs:
2020

2121
- name: Test
2222
run: python -m unittest discover --start-directory python_bindings/tests --pattern "*_test*.py"
23+
24+
test_cpp:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: "3.10"
31+
32+
- name: Build
33+
run: |
34+
mkdir build
35+
cd build
36+
cmake ..
37+
make
38+
39+
- name: Prepare test data
40+
run: |
41+
pip install numpy
42+
cd examples
43+
python update_gen_data.py
44+
45+
- name: Test
46+
run: |
47+
cd build
48+
./searchKnnCloserFirst_test
49+
./test_updates
50+
./test_updates update

0 commit comments

Comments
 (0)