name: CI
on:
push:
branches: [main]
pull_request:
workflow_call:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
PROTOC_VERSION: "29.3"
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2
with:
tool: protoc@3.${{ env.PROTOC_VERSION }}
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- run: cargo package -p lance-nd --no-verify
rust:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-26, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2
with:
tool: protoc@3.${{ env.PROTOC_VERSION }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace
s3:
runs-on: ubuntu-24.04
env:
LANCE_ND_S3_ENDPOINT: http://127.0.0.1:5155
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2
with:
tool: protoc@3.${{ env.PROTOC_VERSION }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Start an S3 server
run: |
python -m pip install "moto[server]"
nohup moto_server -H 127.0.0.1 -p 5155 > moto.log 2>&1 &
curl -s --retry 20 --retry-connrefused --retry-delay 1 -X PUT http://127.0.0.1:5155/lance-nd-test
- run: cargo test --features aws --test object_store
python:
runs-on: ubuntu-24.04
env:
LANCE_ND_S3_ENDPOINT: http://127.0.0.1:5155
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2
with:
tool: protoc@3.${{ env.PROTOC_VERSION }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Start an S3 server
run: |
python -m pip install "moto[server]"
nohup moto_server -H 127.0.0.1 -p 5155 > moto.log 2>&1 &
curl -s --retry 20 --retry-connrefused --retry-delay 1 -X PUT http://127.0.0.1:5155/lance-nd-test
- name: Build and install the package
working-directory: python
run: |
python -m venv .venv
.venv/bin/python -m pip install maturin
VIRTUAL_ENV=$PWD/.venv .venv/bin/python -m maturin develop --release --extras dev
- name: Test
working-directory: python
run: .venv/bin/python -m pytest
- name: Type check
working-directory: python
run: .venv/bin/python -m mypy