-
Notifications
You must be signed in to change notification settings - Fork 920
214 lines (171 loc) · 5.81 KB
/
Copy pathci.yml
File metadata and controls
214 lines (171 loc) · 5.81 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# CI is a thin wrapper over the Makefile — single source of truth for commands.
# See docs/engineering.md and the Makefile for what each target does.
name: CI
on:
push:
branches: [main]
pull_request:
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
# Full history: scripts/check_file_sizes.py diffs against the base
# branch's merge base, which a shallow clone cannot resolve.
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies (frozen)
run: make install-deps
- name: Lint (ruff + import-linter + repo gates + datetime + openapi drift)
run: make lint
unit:
name: unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies (frozen)
run: make install-deps
- name: Unit tests
run: make test
unit-py313:
name: unit tests (3.13)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.13
- name: Install dependencies (frozen)
run: make install-deps
- name: Unit tests
run: make test
integration:
name: integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies (frozen)
run: make install-deps
- name: Integration tests
run: make integration
integration-py313:
name: integration tests (3.13)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.13
- name: Install dependencies (frozen)
run: make install-deps
- name: Integration tests
run: make integration
integration-milvus:
name: integration tests (Milvus 2.6)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies (frozen)
run: make install-deps
- name: Start Milvus 2.6.22
run: |
curl --fail --location --retry 3 \
--output /tmp/milvus-compose.yml \
https://github.com/milvus-io/milvus/releases/download/v2.6.22/milvus-standalone-docker-compose.yml
docker compose -f /tmp/milvus-compose.yml up -d
for attempt in {1..60}; do
if curl --fail --silent http://127.0.0.1:9091/healthz >/dev/null; then
exit 0
fi
sleep 2
done
docker compose -f /tmp/milvus-compose.yml logs
exit 1
- name: Milvus repository contract
env:
EVEROS_TEST_MILVUS_URI: http://127.0.0.1:19530
EVEROS_TEST_MILVUS_FULL_STARTUP: "1"
run: uv run --frozen pytest tests/integration/test_milvus_remote.py -v
- name: Milvus /get truncation telemetry
env:
EVEROS_TEST_MILVUS_URI: http://127.0.0.1:19530
run: >-
uv run --frozen pytest
tests/e2e/test_get_endpoint_e2e.py::test_get_truncates_above_max_fetch
-v -k milvus
# The contract tests above exercise the repository port directly. This
# drives the same request path the application does -- /add, /flush,
# cascade, every search method, /get -- against the remote backend, so a
# break anywhere between the API and Milvus surfaces here rather than in
# production. Deselecting the LanceDB half keeps the job to its subject.
- name: Milvus end-to-end (tiered API suites)
env:
EVEROS_TEST_MILVUS_URI: http://127.0.0.1:19530
run: uv run --frozen pytest tests/integration/test_tiers -v -k milvus
# The structural half of the port contract runs in the ordinary unit job
# for both adapters. The behavioural half needs a server, so it only has
# a backend to compare against here.
- name: Derived-index port contract (both backends)
env:
EVEROS_TEST_MILVUS_URI: http://127.0.0.1:19530
run: uv run --frozen pytest tests/unit/test_infra/test_index_contract.py -v
- name: Stop Milvus
if: always()
run: docker compose -f /tmp/milvus-compose.yml down -v
package:
name: package build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Python
run: uv python install 3.12
- name: Build and smoke-test package
run: make package