Skip to content

Enforce the context ceiling on the request, not the loop #2043

Enforce the context ceiling on the request, not the loop

Enforce the context ceiling on the request, not the loop #2043

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
check:
name: Check & Clippy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
# Toolchain pinned to match rust-toolchain.toml — bump both together.
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.97.1
components: clippy
- uses: Swatinem/rust-cache@v2
- name: cargo check
run: cargo check --all-targets
- name: cargo clippy
run: cargo clippy --all-targets
fmt:
name: Format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.97.1
components: rustfmt
- name: cargo fmt
run: cargo fmt --all -- --check
test:
name: Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.97.1
- uses: Swatinem/rust-cache@v2
# The memory tests share one embedding model cached at this path;
# without the cache every run downloads it from Hugging Face, which
# fails intermittently and turns unrelated PRs red.
- name: Cache embedding model
uses: actions/cache@v4
with:
path: /tmp/spacebot-test-embedding-cache
key: fastembed-onnx-v1
- name: cargo test (lib)
run: cargo test --lib