From c93a016bf9a790d983866aa2bdf371002ff2e82c Mon Sep 17 00:00:00 2001 From: reaper Date: Sat, 22 Aug 2026 06:46:07 -0500 Subject: [PATCH] ci: stabilize macOS release verification --- .github/workflows/linux-release.yml | 4 ++-- .github/workflows/macos-release.yml | 5 ++--- .github/workflows/runtime-release-watch.yml | 4 ++-- src/main/native/processSupervisor.test.ts | 17 ++++++++++------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 6ffa63f..ec9ee64 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Check out source - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 22 cache: npm diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 6c97322..931db6b 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -23,10 +23,10 @@ jobs: steps: - name: Check out source - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 22 cache: npm @@ -92,4 +92,3 @@ jobs: dist/*.yml dist/SHA256SUMS-macos.txt dist/module-catalog/*.pac - diff --git a/.github/workflows/runtime-release-watch.yml b/.github/workflows/runtime-release-watch.yml index 250c6f9..19f3f1e 100644 --- a/.github/workflows/runtime-release-watch.yml +++ b/.github/workflows/runtime-release-watch.yml @@ -13,8 +13,8 @@ jobs: php-releases: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 with: node-version: 22 - name: Check official PHP releases diff --git a/src/main/native/processSupervisor.test.ts b/src/main/native/processSupervisor.test.ts index 08d3f2d..807063d 100644 --- a/src/main/native/processSupervisor.test.ts +++ b/src/main/native/processSupervisor.test.ts @@ -14,7 +14,7 @@ describe('native process supervisor', () => { command: process.execPath, args: [ '-e', - `const s=require('net').createServer(c=>c.end('ok'));s.listen(${port},'127.0.0.1');console.log('ready')` + `const net=require('net');const s=net.createServer(c=>c.end('ok'));s.on('error',e=>{console.error(e);process.exit(1)});s.listen(${port},'127.0.0.1',()=>console.log('ready'));setInterval(()=>{},1000)` ], cwd: root, logPath: join(root, 'service.log'), @@ -22,12 +22,15 @@ describe('native process supervisor', () => { ready: { port, timeoutMs: 5000 } } const supervisor = new NativeProcessSupervisor() - const state = await supervisor.start(spec) - expect(state.status).toBe('running') - expect(await supervisor.status(spec)).toBe('running') - await new Promise((resolve) => setTimeout(resolve, 50)) - expect(await readFile(spec.logPath, 'utf8')).toContain('ready') - await supervisor.stop(spec) + try { + const state = await supervisor.start(spec) + expect(state.status).toBe('running') + expect(await supervisor.status(spec)).toBe('running') + await new Promise((resolve) => setTimeout(resolve, 50)) + expect(await readFile(spec.logPath, 'utf8')).toContain('ready') + } finally { + await supervisor.stop(spec) + } expect(await supervisor.status(spec)).toBe('stopped') }) })