fix: remove instance wait loop from CI smoke tests
All checks were successful
CI/CD / lint (push) Successful in 48s
CI/CD / test (push) Successful in 1m0s
CI/CD / typecheck (push) Successful in 3m7s
CI/CD / build (amd64) (push) Successful in 2m44s
CI/CD / build (arm64) (push) Successful in 1m56s
CI/CD / smoke (push) Successful in 6m59s
CI/CD / publish-rpm (arm64) (push) Successful in 1m2s
CI/CD / publish-rpm (amd64) (push) Successful in 1m3s
CI/CD / publish-deb (arm64) (push) Successful in 55s
CI/CD / publish-deb (amd64) (push) Successful in 1m21s

Server instances require Docker/Podman (mcpd starts them as containers).
CI has no container runtime, so instances will never reach RUNNING.
Tests requiring running instances are already excluded.

Replace the 5-minute wait loop with a quick fixture verification step
that confirms servers, projects, and prompts were applied correctly,
and reports instance status for informational purposes only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michal Rydlikowski
2026-03-13 23:34:59 +00:00
parent de04055120
commit 420f371897

View File

@@ -216,28 +216,32 @@ jobs:
- name: Apply smoke test fixtures
run: mcpctl apply -f src/mcplocal/tests/smoke/fixtures/smoke-data.yaml
- name: Wait for server instance
- name: Verify fixture applied
run: |
echo "Waiting for smoke-aws-docs instance..."
for i in $(seq 1 10); do
STATUS=$(mcpctl get instances -o json 2>/dev/null | \
node -e "try{const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));const i=Array.isArray(d)?d.find(x=>x.serverName&&x.serverName.includes('aws')):null;console.log(i?.status??'WAITING')}catch{console.log('WAITING')}" 2>/dev/null || echo "WAITING")
echo " Instance status: $STATUS ($i/10)"
if [ "$STATUS" = "RUNNING" ]; then
echo "Instance is running!"
break
fi
if [ "$i" = "10" ]; then
echo "::warning::Instance did not reach RUNNING — container management may not be available in CI"
echo "API-layer smoke tests will still run"
fi
sleep 2
done
echo "==> Checking applied fixtures..."
mcpctl get servers -o json | node -e "
const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));
console.log('Servers:', Array.isArray(d) ? d.map(s=>s.name).join(', ') : 'none');
"
mcpctl get projects -o json | node -e "
const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));
console.log('Projects:', Array.isArray(d) ? d.map(p=>p.name).join(', ') : 'none');
"
# Server instances require Docker/Podman (container orchestrator).
# CI has no container runtime, so instances will stay in PENDING.
# Tests that need running instances are excluded below.
echo "==> Instance status (informational — no container runtime in CI):"
mcpctl get instances -o json 2>/dev/null | node -e "
const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));
if (Array.isArray(d)) d.forEach(i => console.log(' ' + (i.serverName||i.name) + ': ' + i.status));
else console.log(' (none)');
" || echo " (no instances)"
- name: Run smoke tests
# Exclude tests that need a running MCP server instance (Docker) or
# LLM providers CI has neither. --no-file-parallelism avoids
# concurrent requests crashing mcplocal.
# Server instances need Docker/Podman to start (container-based MCP
# servers). CI has no container runtime, so exclude tests that
# require a running server instance or LLM providers.
# --no-file-parallelism avoids concurrent requests crashing mcplocal.
run: >-
pnpm --filter mcplocal exec vitest run
--config vitest.smoke.config.ts