Files
lancedb/.github/workflows/cli.yml
T
Colin Patrick McCabe 301ccad3aa feat: add a LanceDB command line (#4600)
Add a LanceDB command line with the following functionality:

- `lancedb auth`: log in with OAuth, check cached OAuth session status,
or log out.
- `lancedb profile`: Create, edit, list, show, select, and delete
connection profiles.
- When no subcommand is given, we will attempt to create a SQL shell.

Update ci/check_cargo_lock.py and its regression tests to allow
pruning dependency edges while their target packages remain in
Cargo.lock. Removing the CLI from the Python source distribution
can disable optional features such as Axum tracing, even though
other SDK dependencies still require the tracing package.
2026-10-29 12:39:46 -07:00

46 lines
1.6 KiB
YAML

name: CLI
on:
push:
branches: [main]
pull_request:
paths:
- 'rust/lancedb/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/cli.yml'
permissions:
contents: read
jobs:
test:
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
with:
components: clippy
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
- name: Install Linux prerequisites
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libssl-dev clang
- name: Install macOS prerequisites
if: runner.os == 'macOS'
run: brew install protobuf
- name: Build standalone CLI binary
run: cargo build --locked --profile ci -p lancedb-cli --bin lancedb
- name: Test standalone CLI
run: cargo test --locked --profile ci -p lancedb-cli
- name: Test SDK SQL
run: cargo test --locked --profile ci -p lancedb --features remote --lib remote::sql
- name: Lint CLI
run: cargo clippy --locked --profile ci -p lancedb-cli --all-targets --all-features -- -D warnings
- name: Check SDK without remote support
# Feature-disabled SDK code has existing unused-code warnings; this is a compile check.
env:
RUSTFLAGS: ""
run: cargo check --locked --profile ci -p lancedb --no-default-features --tests