Skip to content

Commit fee082e

Browse files
committed
Add CI coverage for ldk-server-mcp
Run MCP-specific formatting, clippy, and crate tests in a dedicated workflow and add a separate job that exercises the MCP e2e sanity suite on Ubuntu. Co-Authored-By: HAL 9000
1 parent d59daf4 commit fee082e

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/mcp.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: MCP Checks
2+
3+
on: [ push, pull_request ]
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
mcp-unit:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout source code
18+
uses: actions/checkout@v6
19+
20+
- name: Install Rust stable toolchain
21+
run: |
22+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
23+
rustup override set stable
24+
rustup component add rustfmt clippy
25+
26+
- name: Check formatting
27+
run: cargo fmt --all -- --check
28+
29+
- name: Check MCP crate builds
30+
run: cargo check -p ldk-server-mcp
31+
32+
- name: Run MCP crate tests
33+
run: cargo test -p ldk-server-mcp
34+
35+
- name: Run MCP crate clippy
36+
run: cargo clippy -p ldk-server-mcp --all-targets -- -D warnings
37+
38+
mcp-e2e:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v6
44+
45+
- name: Enable caching for bitcoind
46+
id: cache-bitcoind
47+
uses: actions/cache@v5
48+
with:
49+
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
50+
key: bitcoind-${{ runner.os }}-${{ runner.arch }}
51+
52+
- name: Download bitcoind
53+
if: steps.cache-bitcoind.outputs.cache-hit != 'true'
54+
run: |
55+
source ./scripts/download_bitcoind.sh
56+
mkdir -p bin
57+
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
58+
59+
- name: Set bitcoind environment variable
60+
run: echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
61+
62+
- name: Run MCP end-to-end tests
63+
run: cargo test --manifest-path e2e-tests/Cargo.toml mcp --verbose --color=always -- --test-threads=4 --nocapture
64+
env:
65+
RUST_BACKTRACE: 1
66+
BITCOIND_SKIP_DOWNLOAD: 1

0 commit comments

Comments
 (0)