fix(ci): support memind-ci-mac runner and stabilize acceptance HTTP server
The self-hosted macOS runner cannot run apt-get or install Linux-only Sharp packages; gate CI on sqlite availability and platform-specific Sharp setup. Also wait for ephemeral Express listen before fetch to avoid AUTH-08 flakes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -98,8 +98,17 @@ function buildApp(workspaceRoot, pool = createPool('public')) {
|
||||
return app;
|
||||
}
|
||||
|
||||
async function request(app, method, url, { body, headers } = {}) {
|
||||
async function listenEphemeral(app) {
|
||||
const server = app.listen(0);
|
||||
await new Promise((resolve, reject) => {
|
||||
server.once('listening', resolve);
|
||||
server.once('error', reject);
|
||||
});
|
||||
return server;
|
||||
}
|
||||
|
||||
async function request(app, method, url, { body, headers } = {}) {
|
||||
const server = await listenEphemeral(app);
|
||||
try {
|
||||
const { port } = server.address();
|
||||
const response = await fetch(`http://127.0.0.1:${port}${url}`, {
|
||||
|
||||
Reference in New Issue
Block a user