@@ -11,26 +11,43 @@ permissions:
1111
1212jobs :
1313 build :
14- runs-on : ubuntu-latest
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ include :
18+ - os : ubuntu-latest
19+ name : Linux x64
20+ - os : ubuntu-24.04-arm
21+ name : Linux ARM64
22+ - os : windows-latest
23+ name : Windows x64
24+ - os : windows-11-arm
25+ name : Windows ARM64
26+ - os : macos-latest
27+ name : macOS ARM64
28+
29+ name : Build (${{ matrix.name }})
30+ runs-on : ${{ matrix.os }}
31+
1532 steps :
1633 - uses : actions/checkout@v4
1734
1835 - name : Verify no private URLs in package-lock.json
36+ shell : bash
1937 run : ' ! grep -E "\"resolved\": \"https?://" package-lock.json | grep -v registry.npmjs.org'
2038
21- - uses : oven-sh/setup-bun@v2
22- with :
23- bun-version : latest
24-
2539 - uses : actions/setup-node@v4
2640 with :
2741 node-version : " 20"
2842
2943 - run : npm install
3044
31- - run : npm run build:all
45+ - run : npm run build
46+
47+ - run : npm run examples:build
3248
3349 - name : Verify generated schemas are up-to-date
50+ shell : bash
3451 run : |
3552 npm run generate:schemas
3653 git diff --exit-code src/generated/ || (echo "Generated schemas are out of date. Run 'npm run generate:schemas' and commit." && exit 1)
@@ -101,3 +118,67 @@ jobs:
101118 name : test-results
102119 path : test-results/
103120 retention-days : 7
121+
122+ # Test build in Windows WSL (Ubuntu)
123+ build-wsl :
124+ name : Build (Windows WSL)
125+ runs-on : windows-latest
126+
127+ steps :
128+ - uses : actions/checkout@v4
129+
130+ - uses : Vampire/setup-wsl@v5
131+ with :
132+ distribution : Ubuntu-24.04
133+
134+ - name : Install Node.js in WSL
135+ shell : wsl-bash {0}
136+ run : |
137+ sudo apt-get update
138+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
139+ sudo apt-get install -y nodejs
140+
141+ - name : Build and test in WSL
142+ shell : wsl-bash {0}
143+ run : |
144+ npm install
145+ npm run build
146+ npm run examples:build
147+ npm test
148+ npm run prettier
149+
150+ # Test that the package can be installed from git (triggers prepare script)
151+ test-git-install :
152+ strategy :
153+ fail-fast : false
154+ matrix :
155+ include :
156+ - os : ubuntu-latest
157+ name : Linux x64
158+ - os : ubuntu-24.04-arm
159+ name : Linux ARM64
160+ - os : windows-latest
161+ name : Windows x64
162+ - os : windows-11-arm
163+ name : Windows ARM64
164+ - os : macos-latest
165+ name : macOS ARM64
166+
167+ name : Test git install (${{ matrix.name }})
168+ runs-on : ${{ matrix.os }}
169+
170+ steps :
171+ - uses : actions/setup-node@v4
172+ with :
173+ node-version : " 20"
174+
175+ - name : Create test project and install from git
176+ shell : bash
177+ run : |
178+ mkdir test-project
179+ cd test-project
180+ npm init -y
181+ # Install from the PR branch
182+ npm install "git+https://github.com/${{ github.repository }}#${{ github.head_ref || github.ref_name }}"
183+ # Verify the package is usable (ESM import)
184+ node --input-type=module -e "import { App } from '@modelcontextprotocol/ext-apps'; console.log('Import successful:', typeof App)"
0 commit comments