name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test
- name: CLI smoke
run: |
cargo run -- --help
cargo run -- init --db ci_smoke.db --seed-demo --profile balanced --index-mode brute_force
cargo run -- query --db ci_smoke.db --text "local agent memory" --top-k 2
cargo run -- doctor --db ci_smoke.db
- name: Benchmark smoke
run: |
cargo run --bin sqlrite-bench -- \
--corpus 2000 \
--queries 120 \
--warmup 30 \
--concurrency 1 \
--embedding-dim 64 \
--candidate-limit 300 \
--batch-size 256 \
--index-mode brute_force \
--durability balanced \
--output bench_smoke_ci.json
- name: Upload benchmark smoke report
uses: actions/upload-artifact@v4
with:
name: bench-smoke-ci
path: bench_smoke_ci.json