name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt
run: cargo fmt --all -- --check
clippy:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Cache Hugging Face Hub (MiniLM)
uses: ./.github/actions/cache-hf-hub
- name: Seed MiniLM embed weights
run: bash scripts/seed-minilm-weights.sh
- name: cargo clippy
run: cargo clippy --locked --all-targets -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Cache Hugging Face Hub (MiniLM)
uses: ./.github/actions/cache-hf-hub
- name: Seed MiniLM embed weights
run: bash scripts/seed-minilm-weights.sh
- name: cargo test (offline)
run: cargo test --locked