Skip to content

Commit a404448

Browse files
Added Redis Vector Sets checks on CI
1 parent cdce55d commit a404448

File tree

2 files changed

+121
-16
lines changed

2 files changed

+121
-16
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Test Basic Functionality - Redis Vector Sets
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test-basic-functionality:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ['3.10', '3.11', '3.12', '3.13']
13+
14+
services:
15+
redis:
16+
image: redis:8.2-rc1-bookworm
17+
ports:
18+
- 6379:6379
19+
options: >-
20+
--health-cmd "redis-cli ping"
21+
--health-interval 10s
22+
--health-timeout 5s
23+
--health-retries 5
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Install Poetry
35+
uses: snok/install-poetry@v1
36+
with:
37+
version: latest
38+
virtualenvs-create: true
39+
virtualenvs-in-project: true
40+
41+
- name: Install dependencies
42+
run: |
43+
poetry install --no-root
44+
45+
- name: Install Redis CLI
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y redis-tools
49+
50+
- name: Wait for Redis to be ready
51+
run: |
52+
echo "Waiting for Redis to be ready..."
53+
timeout 30 bash -c 'until redis-cli -h localhost -p 6379 ping; do sleep 1; done'
54+
echo "Redis is ready!"
55+
56+
- name: Test describe functionality
57+
run: |
58+
echo "Testing --describe commands..."
59+
poetry run python run.py --describe datasets | head -10
60+
poetry run python run.py --describe engines | head -10
61+
echo "✅ Describe functionality works"
62+
63+
- name: Test basic benchmark functionality
64+
run: |
65+
echo "Testing basic benchmark with Redis..."
66+
echo "Running: python run.py --host localhost --engines redis-default-simple --datasets glove-25-angular --queries 10"
67+
68+
# Run with limited queries for faster testing
69+
poetry run python run.py \
70+
--host localhost \
71+
--engines vectorsets-fp32-default \
72+
--datasets random-100 \
73+
--queries 10 \
74+
--timeout 300
75+
76+
- name: Verify results were generated
77+
run: |
78+
echo "Checking if results were generated..."
79+
if [ -d "results" ] && [ "$(ls -A results)" ]; then
80+
echo "✅ Results directory contains files:"
81+
ls -la results/
82+
83+
# Check for summary file
84+
if ls results/*summary.json 1> /dev/null 2>&1; then
85+
echo "✅ Summary file found"
86+
echo "Sample summary content:"
87+
head -20 results/*summary.json
88+
else
89+
echo "⚠️ No summary file found"
90+
fi
91+
92+
# Check for experiment files
93+
if ls results/*redis-default-simple*.json 1> /dev/null 2>&1; then
94+
echo "✅ Experiment result files found"
95+
else
96+
echo "⚠️ No experiment result files found"
97+
fi
98+
else
99+
echo "❌ No results generated"
100+
exit 1
101+
fi
102+
103+
- name: Test with skip options
104+
run: |
105+
echo "Testing with --skip-upload (search only)..."
106+
poetry run python run.py \
107+
--host localhost \
108+
--engines vectorsets-fp32-default \
109+
--datasets random-100 \
110+
--queries 50 \
111+
--skip-upload \
112+
--timeout 180
113+
114+
echo "✅ Skip upload test completed"
115+
116+
- name: Cleanup
117+
run: |
118+
echo "Cleaning up test files..."
119+
rm -rf datasets/random-100/
120+
rm -rf results/
121+
echo "✅ Cleanup completed"

.github/workflows/test-basic-functionality.yml renamed to .github/workflows/test-basic-functionality-redisearch.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,7 @@ name: Test Basic Functionality - Redis RediSearch
22

33
on:
44
push:
5-
paths:
6-
- 'run.py'
7-
- 'engine/**'
8-
- 'benchmark/**'
9-
- 'datasets/datasets.json'
10-
- 'experiments/configurations/**'
11-
- 'pyproject.toml'
12-
- '.github/workflows/test-basic-functionality.yml'
135
pull_request:
14-
paths:
15-
- 'run.py'
16-
- 'engine/**'
17-
- 'benchmark/**'
18-
- 'datasets/datasets.json'
19-
- 'experiments/configurations/**'
20-
- 'pyproject.toml'
21-
- '.github/workflows/test-basic-functionality.yml'
226

237
jobs:
248
test-basic-functionality:

0 commit comments

Comments
 (0)