mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-30 15:55:49 +00:00
Compare commits
2 Commits
perf/cover
...
ci/e2e-use
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
155f6beb3f | ||
|
|
ea30b24cd4 |
20
.github/workflows/deploy.yml
vendored
20
.github/workflows/deploy.yml
vendored
@@ -184,6 +184,20 @@ jobs:
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Set up Go 1.22
|
||||
if: steps.docs-check.outputs.docs_only != 'true'
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.22'
|
||||
cache-dependency-path: cmd/server/go.sum
|
||||
|
||||
- name: Build Go server for E2E tests
|
||||
if: steps.docs-check.outputs.docs_only != 'true'
|
||||
run: |
|
||||
cd cmd/server
|
||||
go build -o ../../corescope-server .
|
||||
echo "Go server built successfully"
|
||||
|
||||
- name: Install npm dependencies
|
||||
if: steps.docs-check.outputs.docs_only != 'true'
|
||||
run: npm ci --production=false
|
||||
@@ -244,7 +258,7 @@ jobs:
|
||||
# Kill any stale server on 13581
|
||||
fuser -k 13581/tcp 2>/dev/null || true
|
||||
sleep 2
|
||||
COVERAGE=1 PORT=13581 node server.js &
|
||||
./corescope-server -port 13581 -public public-instrumented &
|
||||
echo $! > .server.pid
|
||||
echo "Server PID: $(cat .server.pid)"
|
||||
# Health-check poll loop (up to 30s)
|
||||
@@ -256,7 +270,7 @@ jobs:
|
||||
if [ "$i" -eq 30 ]; then
|
||||
echo "Server failed to start within 30s"
|
||||
echo "Last few lines from server logs:"
|
||||
ps aux | grep "PORT=13581" || echo "No server process found"
|
||||
ps aux | grep "corescope-server" || echo "No server process found"
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
@@ -312,7 +326,7 @@ jobs:
|
||||
if: steps.docs-check.outputs.docs_only != 'true' && steps.changes.outputs.frontend == 'false'
|
||||
run: |
|
||||
fuser -k 13581/tcp 2>/dev/null || true
|
||||
PORT=13581 node server.js &
|
||||
./corescope-server -port 13581 -public public &
|
||||
SERVER_PID=$!
|
||||
# Wait for server to be ready (up to 15s)
|
||||
for i in $(seq 1 15); do
|
||||
|
||||
@@ -840,17 +840,7 @@ async function run() {
|
||||
assert(content.length > 10, 'Perf content should still be present after refresh');
|
||||
});
|
||||
|
||||
// Test: Node.js perf page shows Event Loop metrics (not Go Runtime)
|
||||
await test('Perf page shows Event Loop on Node server', async () => {
|
||||
const perfText = await page.$eval('#perfContent', el => el.textContent);
|
||||
// Node.js server should show Event Loop metrics
|
||||
const hasEventLoop = perfText.includes('Event Loop') || perfText.includes('event loop');
|
||||
const hasMemory = perfText.includes('Memory') || perfText.includes('RSS');
|
||||
assert(hasEventLoop || hasMemory, 'Node perf page should show Event Loop or Memory metrics');
|
||||
// Should NOT show Go Runtime section on Node.js server
|
||||
const hasGoRuntime = perfText.includes('Go Runtime');
|
||||
assert(!hasGoRuntime, 'Node perf page should NOT show Go Runtime section');
|
||||
});
|
||||
|
||||
|
||||
// Test: Go perf page shows Go Runtime section (goroutines, GC)
|
||||
// NOTE: This test requires GO_BASE_URL pointing to Go staging (port 82)
|
||||
|
||||
Reference in New Issue
Block a user