name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 - name: Check release version alignment
run: python3 scripts/check_versions.py
- 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: mdBook
run: |
mdbook build
cp docs/install.sh book/install.sh
sh -n book/install.sh
test -f book/index.html
- name: CLI help smoke
run: |
cargo run --locked -- --help
cargo run --locked -- setup --help
cargo run --locked -- audit --help
cargo run --locked -- audit prepare --help | tee /tmp/oy-audit-help.txt
grep -F -- "--max-chunks <N>" /tmp/oy-audit-help.txt
cargo run --locked -- audit finalize --help
cargo run --locked -- review --help
cargo run --locked -- review prepare --help
cargo run --locked -- review finalize --help
cargo run --locked -- doctor --help
cargo run --locked -- upgrade --help
- name: Agent skills smoke
run: |
cargo build --locked
export PATH="$PWD/target/debug:$PATH"
oy setup
test -f "$HOME/.agents/skills/oy-audit/SKILL.md"
test -f "$HOME/.agents/skills/oy-review/SKILL.md"
test -f "$HOME/.agents/skills/oy-enhance/SKILL.md"
test -f "$HOME/.agents/skills/oy-setup/SKILL.md"
test -f "$HOME/.agents/skills/oy-setup/oy-persona.md"
oy doctor --check --json | tee /tmp/oy-doctor.json
python3 -c 'import json; data=json.load(open("/tmp/oy-doctor.json")); assert data["check_ok"] is True; assert data["skills"]["global"]["complete"] is True'
oy setup --remove
test ! -d "$HOME/.agents/skills/oy-audit"
test ! -f "$HOME/.agents/skills/oy-setup/SKILL.md"
- name: Documentation drift checks
run: |
! grep -R -n -E 'src/(app|chat|config|model|session|ui)\.rs' README.md CONTRIBUTING.md docs
- name: Installer smoke
run: sh scripts/test_install.sh
- name: Shellcheck
run: shellcheck docs/install.sh scripts/test_install.sh
- name: Package crate
run: |
mkdir -p .oy/runs/package-sentinel
printf 'private evidence\n' > .oy/runs/package-sentinel/chunk.txt
cargo package --locked --allow-dirty --list > /tmp/oy-package-files.txt
python3 - <<'PY'
files = open("/tmp/oy-package-files.txt", encoding="utf-8").read().splitlines()
assert not any(path == ".oy" or path.startswith(".oy/") for path in files)
PY
cargo package --locked