@@ -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)
6784 name : test-results
6885 path : test-results/
6986 retention-days : 7
87+
88+ # Test build in Windows WSL (Ubuntu)
89+ build-wsl :
90+ name : Build (Windows WSL)
91+ runs-on : windows-latest
92+
93+ steps :
94+ - uses : actions/checkout@v4
95+
96+ - uses : Vampire/setup-wsl@v5
97+ with :
98+ distribution : Ubuntu-24.04
99+
100+ - name : Install Node.js in WSL
101+ shell : wsl-bash {0}
102+ run : |
103+ sudo apt-get update
104+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
105+ sudo apt-get install -y nodejs
106+
107+ - name : Build and test in WSL
108+ shell : wsl-bash {0}
109+ run : |
110+ npm install
111+ npm run build
112+ npm run examples:build
113+ npm test
114+ npm run prettier
115+
116+ # Test that the package can be installed from git (triggers prepare script)
117+ test-git-install :
118+ strategy :
119+ fail-fast : false
120+ matrix :
121+ include :
122+ - os : ubuntu-latest
123+ name : Linux x64
124+ - os : ubuntu-24.04-arm
125+ name : Linux ARM64
126+ - os : windows-latest
127+ name : Windows x64
128+ - os : windows-11-arm
129+ name : Windows ARM64
130+ - os : macos-latest
131+ name : macOS ARM64
132+
133+ name : Test git install (${{ matrix.name }})
134+ runs-on : ${{ matrix.os }}
135+
136+ steps :
137+ - uses : actions/setup-node@v4
138+ with :
139+ node-version : " 20"
140+
141+ - name : Create test project and install from git
142+ shell : bash
143+ run : |
144+ mkdir test-project
145+ cd test-project
146+ npm init -y
147+ # Install from the PR branch
148+ npm install "git+https://github.com/${{ github.repository }}#${{ github.head_ref || github.ref_name }}"
149+ # Verify the package is usable (ESM import)
150+ node --input-type=module -e "import { App } from '@modelcontextprotocol/ext-apps'; console.log('Import successful:', typeof App)"
0 commit comments