name: test
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: fmt
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --workspace --all-targets -- -D warnings
test:
strategy:
fail-fast: false
matrix:
features:
- ""
- "--no-default-features"
- "--no-default-features --features cli"
- "--no-default-features --features cli,http"
- "--no-default-features --features http,mcp"
- "--no-default-features --features cli,mcp"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: test
run: cargo test -p xyz-rust --lib ${{ matrix.features }}
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: "end-to-end (real binary: CLI / HTTP / MCP stdio / MCP http / TLS)"
run: cargo test -p xyz-example --test e2e
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.89
- name: check
run: cargo check -p xyz-rust