-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (122 loc) · 6.29 KB
/
Copy pathci.yml
File metadata and controls
129 lines (122 loc) · 6.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: CI
# Dual-spec feature matrix for the 2026-07-28 cutover branch:
# - default lane is MCP 2026-07-28 (stateless core)
# - 2025-11-25 is the opt-in legacy lane
# Gates derived from docs/plans/2026-07-28-final-readiness-audit.md §7.
# All jobs use standard ubuntu-latest runners (free on public repos).
# The same gates run locally via scripts/ci-gates.sh.
on:
push:
branches: ["**"]
pull_request:
env:
CARGO_TERM_COLOR: always
# Warnings are denied via the explicit `cargo clippy -- -D warnings` step and the
# test-build warning sweep, not a global RUSTFLAGS (which would also fail on any
# transient workspace-crate warning outside the audited gates).
jobs:
default-2026:
name: Default lane (2026-07-28)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# The full workspace debug build (all test binaries) overflows the
# default runner disk — three runs died on "No space left on device"
# with lld Bus errors. Drop the preinstalled SDKs we never use.
- name: Free runner disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h /
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Build (default = protocol-2026-07-28)
run: cargo build
- name: Clippy (deny warnings)
run: cargo clippy --all-targets -- -D warnings
- name: Test
run: cargo test
- name: Warning sweep on the test build
run: |
n=$(cargo test --no-run 2>&1 | grep -c 'warning:' || true)
echo "test-build warnings: $n"
test "$n" = "0"
- name: 2026 stateless acceptance (real HTTP)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test discover_stateless_2026
- name: 2026 HTTP surface (GET/DELETE 405, session-id ignored)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test stateless_2026_http_surface
- name: 2026 subscriptions/listen (ack-first, filtered delivery)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test subscriptions_listen_2026
- name: 2026 request-metadata headers (Mcp-Method/Mcp-Name, -32001/-32004)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test mcp_headers_2026
- name: 2026 unknown-method mapping (404 + -32601)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test error_mapping_2026
- name: 2026 MRTR (input_required round trip, -32003 capability gate)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test mrtr_2026
- name: 2026 Mcp-Param-* mirroring (x-mcp-header validation)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test mcp_param_2026
- name: 2026 per-request log gating (logLevel opt-in)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test log_gating_2026
- name: 2026 schema fidelity (derive/builders pipeline to the wire)
run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test schema_fidelity_2026
- name: protocol-2026 compliance + upstream wire fixtures
run: cargo test -p turul-mcp-protocol-2026-07-28 --features compliance
- name: Bilingual client (not in default-members)
run: cargo test -p turul-mcp-client
opt-in-2025:
name: Opt-in lane (2025-11-25)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Per-crate 2025-11-25 build matrix
run: |
set -euxo pipefail
cargo build -p turul-mcp-server --no-default-features --features http,sse,protocol-2025-11-25
cargo clippy -p turul-mcp-server --no-default-features --features http,sse,protocol-2025-11-25 -- -D warnings
cargo build -p turul-mcp-builders --no-default-features --features protocol-2025-11-25
cargo build -p turul-http-mcp-server --no-default-features --features sse,protocol-2025-11-25
cargo build -p turul-mcp-derive --no-default-features --features protocol-2025-11-25
cargo build -p turul-mcp-aws-lambda --no-default-features --features cors,sse,protocol-2025-11-25
cargo build -p turul-mcp-client --no-default-features --features http,sse,client-2025-11-25-only
cargo build -p turul-mcp-client --no-default-features --features http,sse,client-2026-07-28-only
cargo build -p client-initialise-server --no-default-features
- name: 2025-11-25 regression E2E (real servers)
run: |
set -euxo pipefail
cargo test -p mcp-tools-tests
cargo test -p mcp-resources-tests
cargo test -p mcp-prompts-tests
cargo test -p mcp-roots-tests
cargo test -p mcp-sampling-tests
cargo test -p mcp-elicitation-tests
cargo test -p turul-mcp-framework-integration-tests --test tasks_e2e_inmemory
spec-mutex:
name: Spec mutex (both features must not compile)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Enabling both protocol features must be a compile_error
run: |
if cargo build -p turul-mcp-protocol --features protocol-2025-11-25,protocol-2026-07-28 2>/dev/null; then
echo "ERROR: the spec mutex did not fire — both protocol features compiled together"
exit 1
fi
echo "OK: spec mutex fired as expected"
docs:
name: Rustdoc (deny warnings)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: cargo doc (deny rustdoc warnings)
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps