33 push :
44 branches :
55 - main
6+ # pull_request:
7+ # branches:
8+ # - "**"
69 workflow_call :
710
8- # on:
9- # push:
10- # branches:
11- # - main
12- # pull_request:
13- # branches:
14- # - "**"
15- #
16-
1711jobs :
1812 rust_check :
19- name : Rust check
20- runs-on : ubuntu-latest
13+ name : Rust Checks (${{ matrix.os }})
14+ runs-on : ${{ matrix.os }}
15+ strategy :
16+ matrix :
17+ os : [ubuntu-latest, windows-latest]
18+ fail-fast : false # Continue testing other OSes even if one fails
2119 steps :
2220 - name : Checkout
2321 uses : actions/checkout@v4
22+
2423 - name : Cache Rust
2524 uses : actions/cache@v4
2625 with :
@@ -29,42 +28,77 @@ jobs:
2928 ~/.cargo/registry
3029 ~/.cargo/git
3130 target
32- key : ${{ runner .os }}-rust-${{ steps.toolchain.outputs.cachekey }}
33- restore-keys : ${{ runner .os }}-rust-
31+ key : ${{ matrix .os }}-rust-${{ hashFiles('Cargo.lock') }}
32+ restore-keys : ${{ matrix .os }}-rust-
3433
3534 - name : Install Rust Toolchain
3635 uses : dtolnay/rust-toolchain@master
3736 with :
3837 toolchain : stable
39- components : rustfmt
38+ components : rustfmt, clippy
4039
41- - uses : davidB/rust-cargo-make@v1
42- - uses : taiki-e/install-action@nextest
40+ - name : Install cargo-make
41+ uses : davidB/rust-cargo-make@v1
42+
43+ - name : Install nextest
44+ uses : taiki-e/install-action@nextest
4345
4446 - name : Run Clippy
45- run : |
46- cargo make clippy
47+ run : cargo make clippy
48+ continue-on-error : false
4749
4850 - name : Run Rustfmt
49- run : |
50- cargo make fmt
51+ run : cargo make fmt -- --check
52+ if : matrix.os == 'ubuntu-latest' # Run fmt only on Linux
5153
5254 - name : Run cargo doc
55+ env :
56+ RUSTDOCFLAGS : " -Dwarnings"
5357 run : cargo doc --no-deps
58+ if : matrix.os == 'ubuntu-latest' # Run doc only on Linux
5459
5560 - name : Spell Check
56- env :
57- RUSTDOCFLAGS : " -Dwarnings"
5861 uses : crate-ci/typos@master
62+ if : matrix.os == 'ubuntu-latest' # Run typos only on Linux
5963
60- - name : Audit
64+ - name : Audit Dependencies
6165 uses : actions-rust-lang/audit@v1
6266 with :
6367 token : ${{ secrets.GITHUB_TOKEN }}
68+ if : matrix.os == 'ubuntu-latest' # Run audit only on Linux
69+
70+ # install nodejs that is required for tests
71+ - name : Setup Node.js
72+ uses : actions/setup-node@v4
73+ with :
74+ node-version : " 20" # Stable Node.js version
75+ # Verify npx is available
76+ - name : Verify npx
77+ run : npx --version
78+ shell : bash
79+
80+ - name : Install server-everything globally
81+ run : npm install -g @modelcontextprotocol/server-everything
82+ shell : bash
83+
84+ # install Python and uvx that is required for tests
85+ - name : Setup Python
86+ uses : actions/setup-python@v5
87+ with :
88+ python-version : " 3.11" # Stable Python version
89+
90+ - name : Install uv
91+ run : pip install uv
92+ shell : bash
93+
94+ - name : Verify uvx
95+ run : uvx --version
96+ shell : bash
6497
6598 - name : Run Tests
66- run : |
67- cargo make test
99+ run : cargo make test
100+ shell : bash # Ensure consistent shell
101+
68102 - name : Run Doc Tests
69- run : |
70- cargo make doc-test
103+ run : cargo make doc-test
104+ shell : bash # Ensure consistent shell
0 commit comments