Skip to content

Commit a7a585f

Browse files
committed
fix: build from source instead of npx in GitHub Action
The action now builds the conformance tests from the repo source at the referenced commit, rather than using npx to download from npm. This means the action always uses the exact version at the commit it's referenced at, without needing a published npm package. Also removes the 'version' input since it's no longer applicable.
1 parent ab789d6 commit a7a585f

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ steps:
179179
| `scenario` | No | Run a single scenario by name |
180180
| `timeout` | No | Timeout in ms for client tests (default: 30000) |
181181
| `verbose` | No | Show verbose output (default: false) |
182-
| `version` | No | Package version to use (default: latest) |
183182
| `node-version` | No | Node.js version (default: 20) |
184183

185184
## Example Clients

action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ inputs:
2323
description: 'Timeout in milliseconds for client tests (default: 30000)'
2424
required: false
2525
default: '30000'
26-
version:
27-
description: 'Version of @modelcontextprotocol/conformance to use (default: latest)'
28-
required: false
2926
verbose:
3027
description: 'Show verbose output (default: false)'
3128
required: false
@@ -42,14 +39,17 @@ runs:
4239
with:
4340
node-version: ${{ inputs.node-version }}
4441

42+
- name: Build conformance tests
43+
shell: bash
44+
run: |
45+
cd "${{ github.action_path }}"
46+
npm ci
47+
npm run build
48+
4549
- name: Run conformance tests
4650
shell: bash
4751
run: |
48-
# Build the npx package specifier
49-
PACKAGE="@modelcontextprotocol/conformance"
50-
if [ -n "${{ inputs.version }}" ]; then
51-
PACKAGE="${PACKAGE}@${{ inputs.version }}"
52-
fi
52+
CONFORMANCE="${{ github.action_path }}/dist/index.js"
5353
5454
# Build the command arguments
5555
ARGS="${{ inputs.mode }}"
@@ -93,5 +93,5 @@ runs:
9393
ARGS="${ARGS} --verbose"
9494
fi
9595
96-
echo "Running: npx ${PACKAGE} ${ARGS}"
97-
eval "npx -y ${PACKAGE} ${ARGS}"
96+
echo "Running: node ${CONFORMANCE} ${ARGS}"
97+
eval "node ${CONFORMANCE} ${ARGS}"

0 commit comments

Comments
 (0)