fix conformance tests (#483)

# Fix conformance tests.

1. fix node version to workaround
https://github.com/nodejs/node/issues/56645
2. use `@argfile` to handle long classpaths
3. specify extension for npx for windows
4. Install `@modelcontextprotocol/conformance@0.1.8` GitHub Actions
workflow.
5. Centralize logging for process streams in conformance tests: Add
`startLogging` utility for InputStream logging with `KotlinLogging`.
Replace inline process stream handling with `startLogging` calls

Note: Currently tests pass using
`@modelcontextprotocol/conformance@0.1.8`/ But changing to 0.1.9 will
fail client scenarios (it is not related to this PR).

## Motivation and Context
Before fix conformance tests are broken on Windows

## How Has This Been Tested?
Run test locally and in github actions

## Breaking Changes
No

## Types of changes

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
May be we should update `CONTRIBUTING.md/Building/Requirements`. But
currently it does not mention at all: node, android, etc.

---------

Co-authored-by: f.bobin <f.bobin@vk.team>
Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
This commit is contained in:
Fedor Bobin 2026-01-19 16:45:54 +03:00 • committed by GitHub
commit c73507b96a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,11 +14,23 @@ concurrency:
jobs:
run-conformance:
runs-on: macos-latest
name: Run Conformance Tests
runs-on: ${{ matrix.os }}
name: Run Conformance Tests on ${{ matrix.os }}
timeout-minutes: 20
env:
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
max-workers: 3
- os: windows-latest
max-workers: 3
- os: macos-latest
max-workers: 2
steps:
- uses: actions/checkout@v6
@ -31,7 +43,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
node-version: '22' # increase only after https://github.com/nodejs/node/issues/56645 will be fixed
- name: Setup Conformance Tests
working-directory: conformance-test
run: |-
npm install -g @modelcontextprotocol/conformance@0.1.8
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
@ -45,11 +62,12 @@ jobs:
../.konan/**
- name: Run Conformance Tests
run: ./gradlew --no-daemon :conformance-test:test
run: |-
./gradlew :conformance-test:test --no-daemon --max-workers ${{ matrix.max-workers }}
- name: Upload Conformance Results
if: always()
uses: actions/upload-artifact@v6
with:
name: conformance-results
name: conformance-results-${{ matrix.os }}
path: conformance-test/results/