name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 with:
persist-credentials: false
- uses: jdx/mise-action@v4
- name: Install Rust components
run: rustup component add rustfmt clippy
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked --version 0.9.135
- name: Install Miri toolchain
run: rustup toolchain install nightly --profile minimal --component miri --component rust-src
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets --locked -- -D warnings
- name: Test
run: |
cargo nextest run --all-targets --locked --profile ci
cargo test --doc --locked
- name: Miri smoke
run: cargo +nightly miri test --locked miri_smoke
- name: Rustdoc
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked
- name: CLI help smoke
run: |
cargo run --locked -- --help
cargo run --locked -- run --help
cargo run --locked -- chat --help
cargo run --locked -- audit --help | tee /tmp/oy-audit-help.txt
grep -F -- "--max-chunks <N>" /tmp/oy-audit-help.txt
cargo run --locked -- model --help
cargo run --locked -- doctor --help
- name: Documentation drift checks
run: |
! grep -R -n -E 'src/(app|chat|config|model|session|ui)\.rs' README.md CONTRIBUTING.md docs
- name: Package crate
run: cargo package --locked