name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Build & test (all features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --all-targets --all-features --verbose
- name: Test
run: cargo test --all-features --verbose
lib-only:
name: Build library with default features disabled (no mcp-server)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build lib only
run: cargo build --lib --no-default-features --verbose
lint:
name: Clippy & rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Format check
run: cargo fmt -- --check
docker:
name: image builds and answers introspection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t effectfence:ci .
- name: Boot it and send an MCP initialize request
run: |
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-07-28","capabilities":{},"clientInfo":{"name":"ci","version":"0"}}}' \
| docker run -i --rm effectfence:ci | tee out.json
grep -q '"serverInfo"' out.json
grep -q 'effectfence' out.json
storm:
name: storm demo must elect exactly one
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: 1,000-attempt attack
run: |
cargo run --release --example storm | tee storm.txt
grep -q "ONE execution" storm.txt