-
Notifications
You must be signed in to change notification settings - Fork 2
102 lines (86 loc) · 2.84 KB
/
Copy pathtests.yml
File metadata and controls
102 lines (86 loc) · 2.84 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
name: tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
# The package is developed on Windows and installed on macOS, but only Linux
# was ever tested. One leg each converts the "OS Independent" claim from an
# assumption into something CI actually proves. Kept to a single Python
# version per OS to hold CI time down; Postgres stays Linux-only since it
# needs a service container.
include:
- os: windows-latest
python-version: "3.12"
- os: macos-latest
python-version: "3.12"
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package and dev deps
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Cache HuggingFace model
uses: actions/cache@v6
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-hf-all-MiniLM-L6-v2
- name: Lint with ruff
run: ruff check genome tests
- name: Run tests
run: pytest tests/ -v
- name: Smoke-run CLI
run: genome-eval --limit-pairs 5 --output results/ci_smoke.json
# Separate job: exercises the Postgres/pgvector backend against a real
# Postgres 16 + pgvector service container. Runs alongside the SQLite matrix.
test-postgres:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: genome
POSTGRES_PASSWORD: genome
POSTGRES_DB: memorydb
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U genome -d memorydb"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.12
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- name: Install package with Postgres extra
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,postgres]"
- name: Cache HuggingFace model
uses: actions/cache@v6
with:
path: ~/.cache/huggingface
key: ubuntu-latest-hf-all-MiniLM-L6-v2
- name: Run Postgres integration tests
env:
POSTGRES_DSN: "postgresql://genome:genome@localhost:5432/memorydb"
run: pytest tests/memory/test_postgres_store.py -v