Repository navigation
256 lines (208 loc) · 7.38 KB
/
Copy pathci.yml
File metadata and controls
256 lines (208 loc) · 7.38 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# 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-windows:
name: unit tests (Windows)
runs-on: windows-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
# No `make` on the Windows image — call uv directly. The lock is
# universal (it carries sys_platform == 'win32' resolution markers and
# pywin32, which portalocker requires on Windows), so --frozen resolves here.
- name: Install dependencies (frozen)
run: uv sync --frozen
- name: Unit tests
run: uv run pytest tests/unit -q
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
# One container instead of the three-service compose file: embedded etcd
# plus local-disk segment storage, the same knobs upstream's
# scripts/standalone_embed.sh uses. The compose file wants MinIO, and
# MinIO now refuses anonymous pulls on both Docker Hub and quay.io
# ("unauthorized"), which broke this job. Local storage is a dev/CI mode
# -- it drops the object-store hop, not any behaviour these tests read.
- name: Start Milvus 2.6.22
run: |
cat > /tmp/embedEtcd.yaml <<'EOF'
listen-client-urls: http://0.0.0.0:2379
advertise-client-urls: http://0.0.0.0:2379
quota-backend-bytes: 4294967296
auto-compaction-mode: revision
auto-compaction-retention: '1000'
EOF
docker run -d --name milvus --security-opt seccomp:unconfined \
-e ETCD_USE_EMBED=true \
-e ETCD_DATA_DIR=/var/lib/milvus/etcd \
-e ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml \
-e COMMON_STORAGETYPE=local \
-e DEPLOY_MODE=STANDALONE \
-v /tmp/embedEtcd.yaml:/milvus/configs/embedEtcd.yaml \
-p 19530:19530 -p 9091:9091 \
milvusdb/milvus:v2.6.22 milvus run standalone
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 logs milvus
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 rm -f milvus
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