Skip to content

feat: ask --json + clean resume packs (0.26.2) (#50) #185

feat: ask --json + clean resume packs (0.26.2) (#50)

feat: ask --json + clean resume packs (0.26.2) (#50) #185

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: cargo fmt
run: cargo fmt --all --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: cargo test
run: cargo test --workspace --all-targets
- name: cargo doc
run: cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: -D warnings
msrv:
name: msrv (rust 1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.88
# The action tag IS the toolchain version installed; @1.88 pins MSRV.
# (Dependabot bumped this to @1.100 in #17, which tries to install a
# non-existent rust 1.100.0 — revert to the real MSRV.)
uses: dtolnay/rust-toolchain@1.88
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
key: msrv-1.88
# MSRV is guaranteed only for the lean build. The model2vec `embed`
# feature (on by default) pulls tokenizers/hf-hub, which track a newer
# toolchain; it's exercised by the stable `test` jobs instead.
- name: cargo build (MSRV, lean)
run: cargo build --workspace --all-targets --no-default-features
- name: cargo test (MSRV, lean)
run: cargo test --workspace --all-targets --no-default-features
audit:
name: cargo-audit (security advisories)
runs-on: ubuntu-latest
# Non-blocking on first land: an open advisory in a transitive dep should
# surface as a CI annotation but not red-light unrelated changes. Flip
# continue-on-error to false once the baseline is clean.
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
benches-compile:
name: criterion benches (compile only)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: benches
- name: cargo bench --no-run
run: cargo bench --workspace --no-run
coverage:
name: coverage (llvm-cov)
runs-on: ubuntu-latest
# Non-blocking on first land — coverage gates make sense once we have
# 5+ baselines and a target floor agreed. Flip continue-on-error to
# false once that lands.
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
with:
key: coverage
- name: cargo llvm-cov (lcov)
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}