Skip to content

Commit d9ac693

Browse files
committed
chore: move tests to another crate
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent 23b3f3e commit d9ac693

File tree

21 files changed

+105
-13
lines changed

21 files changed

+105
-13
lines changed

.github/workflows/check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,36 @@ jobs:
9797
# run: |
9898
# ! grep -P '\t' -r ./sql
9999

100+
lint:
101+
strategy:
102+
matrix:
103+
arch: ["x86_64", "aarch64"]
104+
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
105+
106+
env:
107+
SCCACHE_GHA_ENABLED: "true"
108+
RUSTUP_AUTO_INSTALL: "0"
109+
RUSTC_WRAPPER: "sccache"
110+
RUSTFLAGS: "-Dwarnings"
111+
CARGO_TERM_COLOR: "always"
112+
RUST_BACKTRACE: "1"
113+
114+
steps:
115+
- name: Install Rust
116+
run: rustup update
117+
118+
- name: Set up Sccache
119+
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
120+
121+
- name: Checkout
122+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
123+
124+
- name: Cargo Test
125+
run: cargo test --locked --workspace --exclude vchord_bm25 --no-fail-fast -- --no-capture
126+
127+
- name: Clippy
128+
run: cargo clippy --locked --workspace --exclude vchord_bm25
129+
100130
psql:
101131
strategy:
102132
matrix:

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pg17 = ["pgrx/pg17"]
2020
pg18 = ["pgrx/pg18"]
2121

2222
[dependencies]
23+
bm25 = { path = "./crates/bm25" }
24+
2325
arrayvec = "0.7.6"
2426
bitflags = "2.10.0"
2527
bitpacking = { version = "0.9.3", default-features = false, features = [

crates/bm25/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "bm25"
3+
version.workspace = true
4+
edition.workspace = true
5+
publish = false
6+
7+
[dependencies]
8+
bitpacking = { version = "0.9.3", default-features = false, features = [
9+
"bitpacker4x",
10+
] }
11+
12+
[dev-dependencies]
13+
rand.workspace = true
14+
15+
[lints]
16+
workspace = true
File renamed without changes.
File renamed without changes.

src/algorithm/block_partition/fixed_block_partition.rs renamed to crates/bm25/src/algorithm/block_partition/fixed_block_partition.rs

File renamed without changes.
File renamed without changes.

crates/bm25/src/algorithm/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This software is licensed under a dual license model:
2+
//
3+
// GNU Affero General Public License v3 (AGPLv3): You may use, modify, and
4+
// distribute this software under the terms of the AGPLv3.
5+
//
6+
// Elastic License v2 (ELv2): You may also use, modify, and distribute this
7+
// software under the Elastic License v2, which has specific restrictions.
8+
//
9+
// We welcome any commercial collaboration or support. For inquiries
10+
// regarding the licenses, please contact us at:
11+
// vectorchord-inquiry@tensorchord.ai
12+
//
13+
// Copyright (c) 2025 TensorChord Inc.
14+
15+
pub mod block_encode;
16+
pub mod block_partition;

crates/bm25/src/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This software is licensed under a dual license model:
2+
//
3+
// GNU Affero General Public License v3 (AGPLv3): You may use, modify, and
4+
// distribute this software under the terms of the AGPLv3.
5+
//
6+
// Elastic License v2 (ELv2): You may also use, modify, and distribute this
7+
// software under the Elastic License v2, which has specific restrictions.
8+
//
9+
// We welcome any commercial collaboration or support. For inquiries
10+
// regarding the licenses, please contact us at:
11+
// vectorchord-inquiry@tensorchord.ai
12+
//
13+
// Copyright (c) 2025 TensorChord Inc.
14+
15+
pub mod algorithm;
16+
pub mod utils;

0 commit comments

Comments
 (0)