GitHub Pages & CI/CD
a2a-rust uses GitHub Actions for continuous integration, crate publishing, and documentation deployment. This page covers the main workflows; .github/workflows/README.md lists every workflow, its trigger and which checks are required (including DCO sign-off and the Official TCK).
CI Pipeline
The CI workflow (.github/workflows/ci.yml) runs on pushes to main, on PRs to main, and on demand (workflow_dispatch, for a branch with no PR yet). It no longer runs on pushes to claude/**: those branches are built by their PR, and building them on push as well ran every job twice:
| Job | Description |
|---|---|
| Static checks | cargo fmt --all -- --check, vendored-proto agreement, the 500-line file-length ratchet, no process-global panic hooks, the mutants-config check, and gate-inventory completeness |
| Clippy | cargo clippy per feature combination (default, signing, tracing, tls-rustls, sqlite, postgres, axum, tool-loop, tool-loop + tls-rustls, websocket, grpc, auth-jwt without default features, all-features) across 3 OSes (ubuntu, macOS, Windows) on stable (lint verdicts are a property of the clippy version; the MSRV leg of the Test job is what proves 1.94 compatibility) |
| Feature matrix | cargo hack clippy --each-feature over the four published crates — every feature on its own, plus no-default-features and all-features — so a #[cfg(feature)] gap is caught here rather than by a downstream build enabling an unusual subset |
| Test | cargo nextest run --profile ci per feature combination (default, signing, tracing, tls-rustls on the client and on the server separately, sqlite, postgres, axum, tool-loop, websocket, grpc, auth-jwt, auth-jwt + tls-rustls, all-features, no-default-features) across 3 OSes and 2 Rust versions; then the doctests, which nextest does not run, with cargo test --doc under default, all and no default features |
| Test (postgres integration) | Runs the #[ignore]-gated live-database suites against a postgres:16 service container: postgres_store_tests.rs, the two-handler multi_replica suite, the turn-claim suites (turn_claims, replica_processes, cross_replica_cancel, stale_write_position; the job fails if fewer than their 18 tests ran), encrypted_store, the shared rate-limit counter's tests, and every other test target or library module that reads A2A_TEST_POSTGRES_URL, found by scripts/run_postgres_suites.py rather than named |
| Nightly | Tests and clippy on the nightly Rust toolchain for early compatibility checks (continue-on-error: true — non-blocking; pushes to main and manual runs only) |
| Deny | cargo deny check — audits dependencies for vulnerabilities |
| Doc | cargo doc --workspace --no-deps, then each published crate on its own in its own default features — verifies documentation builds |
| Package | cargo package --workspace (excluding example and tool crates) — validates crate packaging for publish |
| Semver | cargo-semver-checks over the four published crates, all features |
| SDK dogfood | cargo run -p agent-team --release --all-features |
| SLIMRPC binding | the out-of-workspace binding's own cargo fmt --check, clippy (also without default features), slim-node build, cargo-deny, package validation, tests and in_process example, and its SPIFFE tests against a real SPIRE |
| Example surface coverage | two jobs: echo-agent, incident-response, genai and rig, each driving every method over every binding it supports; and multi-lang-team, resilient-agent (durability, failure injection, scaling against PostgreSQL) and swarm |
| Go SDK interop | scripts/go_sdk_interop.sh — both directions, three bindings |
The Coverage workflow (.github/workflows/coverage.yml) runs on pushes to main, on PRs, on demand (which is how a branch with no PR yet gets a coverage number), and weekly (for the codecov.yml ignores-applied check):
- Uses
cargo-llvm-covfor source-based coverage instrumentation - Generates LCOV reports and uploads to Codecov
The Mutation Testing workflow (.github/workflows/mutants.yml) runs separately:
| Mode | Trigger | Scope |
|---|---|---|
| Full sweep | Weekly (Mondays 03:00 UTC) + on-demand (workflow_dispatch) | All library crates, sharded across parallel runners (60-way for a2a-protocol-server, 4-way for a2a-protocol-types and a2a-protocol-client, 1 for a2a-protocol-sdk) |
Every pull request additionally has an incremental mutation gate:
cargo-mutants --in-diff mutates only the source lines changed in the PR
and fails on any missed mutant — this one is a blocking PR check. Its
shards run only while the PR carries the mutation-test label, because a
server shard takes about two hours and each push re-mutates the whole PR
diff; without the label the required Mutation Testing (incremental) check
fails with a message asking for it, so no PR merges unmutated. Add the label
when the code is ready for review; while it is present, every push re-runs
the gate. The full sweep is the one that doesn't run on every
commit: a full sweep can take 100+ minutes per crate and a2a-protocol-server
alone lists about 5,500 mutants (60 shards, about two hours for the slowest, by
the workflow's own projection), so it runs on its own weekly schedule (plus
workflow_dispatch for an on-demand run against main) rather than
blocking PRs.
The full sweep produces a mutation report artifact with caught/missed/unviable counts and a mutation score. The workflow is configured to fail on surviving mutants, so a clean weekly run confirms that every caught mutant across the whole codebase — not just the surface area of recent PRs — is covered by at least one test. The report artifact itself only survives 90 days; see Mutation Testing History for the dated, durable record each sweep should be copied into.
The Benchmarks workflow (.github/workflows/benchmarks.yml) runs on-demand (workflow_dispatch) and on pushes to main that affect benchmark or SDK code. It:
- Builds and runs 13 of the 15 benchmark suites individually via Criterion.rs (
coordinator_chain_under_faultandsend_latency_breakdownare run by hand) - Auto-generates the benchmark results page via
benches/scripts/generate_book_page.sh - Auto-generates the interactive benchmark dashboard via
benches/scripts/generate_dashboard.sh - Commits the updated results page and dashboard to
mainviagithub-actions[bot](skipped while the in-tree version has no release tag) - Archives the full criterion HTML reports (violin plots, comparison overlays) as workflow artifacts with 30-day retention
On PRs that touch benchmark or SDK code, a separate Regression Gate job compares transport_throughput and protocol_overhead against the base branch.
The 15 benchmark suites cover: transport throughput (payload scaling to 1MB), protocol overhead (including protocol/payload_scaling isolation benchmarks for serde regression detection), task lifecycle, concurrent agents, cross-language comparison, realistic workloads, error paths, streaming and backpressure, data volume scaling (with cache-busting), memory overhead, enterprise scenarios, production scenarios, advanced scenarios, the cost breakdown of a blocking send (send_latency_breakdown), and agent-level latency under fault via an in-process 5-hop coordinator chain with fault injection at every link. The last suite is the first benchmark on this page that does not measure SDK-layer overhead; see the Agent-Level Latency Under Fault section for the honest caveats.
The TCK workflow (.github/workflows/tck.yml) runs the Technology Compatibility Kit on pushes to main and PRs. It tests the echo-agent (self-test) and runs cross-language conformance tests against Python, JavaScript, Go, and Java agent implementations with both JSON-RPC and REST bindings.
All actions are SHA-pinned for supply chain security:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Release Pipeline
The release workflow (.github/workflows/release.yml) triggers on version tags:
vX.Y.Z tag → validate → ci + security + conformance (ACTS) → package + publish-dry-run → attest-conformance → github-release → publish (and cli-binaries, when `PUBLISH_CLI_BINARIES` is `true`)
The grpc feature compiles the canonical schema with prost-build/tonic-prost-build using the vendored protoc (protoc-bin-vendored); no workflow installs a system protoc. Set PROTOC to use your own.
Crates are published in dependency order:
a2a-protocol-types(no internal deps)a2a-protocol-client+a2a-protocol-server(depend on types)a2a-protocol-sdk(depends on all three)
Documentation Deployment
.github/workflows/docs.yml builds and deploys the site at
a2a-rust.com. The site is versioned, so a reader on a
release reads that release's documentation:
| Path | What it is |
|---|---|
/ | The latest release's book, built from its tag. The only copy search engines index. |
/vX.Y/ | Each release line's book, at its latest patch release (/v0.14/ is 0.14.1). |
/dev/ | The book built from main, which can describe changes no release has yet. |
/dev/api/ | rustdoc for the four published crates, built from main. |
/api/, /vX.Y/api/ | Redirects to docs.rs at that release; old /api/<crate>/… links are sent there by the 404 page. |
Every page carries a version selector, and a page that is not the latest
release's says so and links to the same page in the latest release.
scripts/build_docs_site.py builds every release line's book from its tag with
the same pinned mdBook, lays the site out, and checks it; its docstring has the
details, and the workflow is the authority on the steps.
It deploys on every push to main (so /dev/ follows main) and when the
Release workflow finishes successfully (so / moves to the new release). The
second runs through workflow_run, which executes on the default branch: the
github-pages environment may refuse a deployment from a tag ref.
Each release line adds about 18 MB, and GitHub Pages caps a site at 1 GB; at 2026-10-12 the site was about 270 MB with 13 release lines.
Setting Up GitHub Pages
- Go to Settings → Pages in your GitHub repo
- Set Source to "GitHub Actions"
- Push to
mainto trigger the first deployment - Your docs will be live at
https://<owner>.github.io/<repo>/, or at the custom domain configured in the same settings page (this project's isa2a-rust.com)
Building Locally
# Install mdBook (the version docs.yml pins)
cargo install mdbook --version 0.4.40 --locked
# Build
mdbook build book
# Serve with hot reload
mdbook serve book --open
Cargo Documentation
The docs workflow also builds rustdoc for the four published crates
(--all-features, --cfg docsrs) from main and publishes it under
/dev/api/; a release's API documentation is the one docs.rs builds from the
published crate, which /api/ redirects to. To build it locally:
# Build API docs for all crates
cargo doc --workspace --no-deps --open
Next Steps
- Configuration Reference — All configuration options
- Changelog — Version history