Skip to content

Commit 186628c

Browse files
committed
use npx and fail on failure
1 parent 8ae4ecf commit 186628c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ci/wss-checker.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ConnectionChecker {
9696
const { domain, port } = ConnectionChecker.parseMaddr(maddr);
9797
return [
9898
maddr,
99-
await ConnectionChecker.spawn(`wscat -c wss://${domain}:${port}`)
99+
await ConnectionChecker.spawn(`npx wscat -c wss://${domain}:${port}`)
100100
];
101101
}
102102

@@ -169,9 +169,17 @@ async function run() {
169169

170170
let maddrs = [...sandbox, ...test];
171171

172-
await ConnectionChecker.checkPlainWss(maddrs),
173-
await ConnectionChecker.checkWakuWss(maddrs),
174-
process.exit(0);
172+
const plainWssResult = await ConnectionChecker.checkPlainWss(maddrs);
173+
const wakuWssResult = await ConnectionChecker.checkWakuWss(maddrs);
174+
175+
const plainWssFail = plainWssResult.some(([_, status]) => status === "FAIL");
176+
const wakuWssFail = wakuWssResult.some(([_, status]) => status === "FAIL");
177+
178+
if (plainWssFail || wakuWssFail) {
179+
process.exit(1);
180+
}
181+
182+
process.exit(0);
175183
}
176184

177185
(async () => {

0 commit comments

Comments
 (0)