refactor(test): add centralized TypeScript server factory for integration tests (#477)
# refactor(test): add centralized TypeScript server factory for integration tests - Create TypeScriptServer class for managing TypeScript MCP servers - Add dedicated typescript/ directory with server infrastructure - Refactor TsTestBase to use TypeScriptServer for stdio transport - Extract TypeScript test tools (greet, multi-greet, prompts, resources) - Use npx tsx for direct execution (better performance than npm run) - Install TypeScript dependencies automatically in test setup The TypeScriptServer factory provides: - startSse(port): Start SSE transport server - startStdio(): Start STDIO transport server - stop(): Graceful server shutdown - installDependencies(): npm install automation <!-- Provide a brief summary of your changes --> ## Motivation and Context To resurrect typescript tests ## How Has This Been Tested? Locally, CI ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [x] Test fix ## 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 - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context #475
This commit is contained in:
parent
29d34b8e48
commit
658b370c87
2 changed files with 2848 additions and 1119 deletions
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
|
||||
- os: windows-latest
|
||||
job-name: "Windows Tests"
|
||||
gradle-tasks: "jvmTest"
|
||||
gradle-tasks: "jvmTest -x :integration-test:jvmTest"
|
||||
max-workers: 3
|
||||
|
||||
- os: macos-latest
|
||||
|
|
@ -64,6 +64,11 @@ jobs:
|
|||
with:
|
||||
node-version: 'lts/*'
|
||||
|
||||
- name: Set up Node Packages
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
working-directory: integration-test/src/jvmTest/typescript
|
||||
run: npm ci
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
with:
|
||||
|
|
@ -75,7 +80,7 @@ jobs:
|
|||
caches
|
||||
notifications
|
||||
sdks
|
||||
.konan/**
|
||||
../.konan/**
|
||||
|
||||
- name: ${{ matrix.job-name }}
|
||||
run: |-
|
||||
|
|
@ -144,6 +149,11 @@ jobs:
|
|||
with:
|
||||
add-job-summary: 'always'
|
||||
cache-read-only: true
|
||||
gradle-home-cache-includes: |
|
||||
caches
|
||||
notifications
|
||||
sdks
|
||||
../.konan/**
|
||||
|
||||
- name: Download Maven Local Repository
|
||||
uses: actions/download-artifact@v7
|
||||
|
|
|
|||
11
.github/workflows/conformance.yml
vendored
11
.github/workflows/conformance.yml
vendored
|
|
@ -31,19 +31,24 @@ jobs:
|
|||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24.11.1'
|
||||
node-version: 'lts/*'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
with:
|
||||
add-job-summary: 'always'
|
||||
cache-read-only: true
|
||||
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
||||
gradle-home-cache-includes: |
|
||||
caches
|
||||
notifications
|
||||
sdks
|
||||
../.konan/**
|
||||
|
||||
- name: Run Conformance Tests
|
||||
run: ./gradlew --no-daemon :conformance-test:test
|
||||
|
||||
- name: Upload Conformance Results
|
||||
if: ${{ !cancelled() }}
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: conformance-results
|
||||
|
|
|
|||
Loading…
Reference in a new issue