Release v1.1.5 #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Suite | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: Test on Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Link package globally for CLI testing | |
run: npm link | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Run integration tests | |
run: npm run test:integration | |
- name: Run E2E tests | |
run: npm run test:e2e | |
- name: Run type checking | |
run: npm run lint | |
- name: Test CLI functionality | |
run: npm run test:cli-startup | |
- name: Test MCP server startup | |
run: npm run test:server-startup | |
- name: Test dual-mode behavior | |
run: npm run test:dual-mode | |
- name: Generate coverage report | |
run: npm run test:coverage | |
if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' | |
with: | |
file: ./coverage/coverage-final.json | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
test-examples: | |
name: Test with real MCP servers | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Link package globally for CLI testing | |
run: npm link | |
- name: Test with SDK server | |
run: | | |
timeout 30s reloaderoo inspect list-tools -- node test-server-sdk.js || exit_code=$? | |
if [ ${exit_code:-0} -eq 124 ]; then | |
echo "Test timed out as expected" | |
exit 0 | |
elif [ ${exit_code:-0} -eq 0 ]; then | |
echo "Test completed successfully" | |
exit 0 | |
else | |
echo "Test failed with exit code $exit_code" | |
exit 1 | |
fi | |
- name: Test proxy mode functionality | |
run: | | |
echo "Testing proxy mode functionality..." | |
# Test proxy startup with deterministic output | |
timeout 5s reloaderoo -- node test-server-sdk.js 2>&1 | tee proxy_output.log || true | |
# Check for proxy startup messages | |
if grep -q "Starting reloaderoo MCP proxy server" proxy_output.log; then | |
echo "✅ Proxy mode startup message found" | |
else | |
echo "ERROR: Proxy mode startup message not found" | |
echo "=== Proxy Output ===" | |
cat proxy_output.log | |
echo "===================" | |
exit 1 | |
fi | |
if grep -q "Starting Reloaderoo" proxy_output.log; then | |
echo "✅ Proxy initialization completed" | |
else | |
echo "ERROR: Proxy initialization not found" | |
echo "=== Proxy Output ===" | |
cat proxy_output.log | |
echo "===================" | |
exit 1 | |
fi | |
echo "✅ Proxy mode functionality test completed" | |
# Clean up | |
rm -f proxy_output.log | |
performance-test: | |
name: Performance benchmarks | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Link package globally for CLI testing | |
run: npm link | |
- name: Run performance tests | |
run: | | |
# Test startup time | |
echo "Testing startup time..." | |
time timeout 10s reloaderoo inspect server-info -- node test-server-sdk.js | |
# Test memory usage | |
echo "Testing memory usage..." | |
timeout 10s reloaderoo inspect ping -- node test-server-sdk.js | |
echo "Performance tests completed" |