File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 9797
9898 - name : Run tests
9999 run : cargo test --all-features
100-
100+
101+ test-no-local :
102+ name : Run Tests (no local feature)
103+ runs-on : ubuntu-latest
104+ steps :
105+ - uses : actions/checkout@v6
106+
107+ # install nodejs
108+ - name : Setup Node.js
109+ uses : actions/setup-node@v6
110+ with :
111+ node-version : ' 20'
112+
113+ - name : Install uv
114+ uses : astral-sh/setup-uv@v7
115+
116+ - name : Install Rust
117+ uses : dtolnay/rust-toolchain@stable
118+
119+ - name : Set up Python
120+ run : uv python install
121+
122+ - name : Create venv for python
123+ run : uv venv
124+
125+ - uses : Swatinem/rust-cache@v2
126+
127+ - name : Run tests without local feature
128+ run : |
129+ FEATURES=$(cargo metadata --no-deps --format-version 1 \
130+ | jq -r '[.packages[] | select(.name == "rmcp") | .features | keys[]
131+ | select(startswith("__") | not)
132+ | select(. != "local")] | join(",")')
133+ cargo test -p rmcp --features "$FEATURES"
134+
101135 coverage :
102136 name : Code Coverage
103137 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ fix: fmt
1010
1111test :
1212 cargo test --all-features
13+ if command -v jq > / dev/ null 2 >&1 ; then \
14+ FEATURES=$(cargo metadata --no-deps --format-version 1 \
15+ | jq -r ' [.packages[] | select(.name == "rmcp") | .features | keys[] \
16+ | select(startswith("__") | not) \
17+ | select(. != "local")] | join(",")' ) && \
18+ cargo test -p rmcp --features " $FEATURES" ; \
19+ else \
20+ echo " warning: jq not found, skipping non-local feature tests" ; \
21+ fi
1322
1423cov :
1524 cargo llvm-cov --lcov --output-path {{ justfile_directory ()}} / target/ llvm-cov-target/ coverage.lcov
You can’t perform that action at this time.
0 commit comments