-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.44 KB
/
tests.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
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
environment: env
strategy:
matrix:
# Max 4 Python versions here, because error:
# "Reached max indexes allowed (5). To add more indexes, upgrade your plan."
python-version: ["3.11", "3.12", "3.13"]
services:
postgres:
image: pgvector/pgvector:0.7.2-pg15
env:
POSTGRES_DB: v2p
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5629:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry to install to /home/runner/.local/bin
run: |
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $GITHUB_ENV
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
env:
PINECONE_API_KEY: ${{secrets.PINECONE_API_KEY}}