diff --git a/.github/probe-api.mjs b/.github/probe-api.mjs new file mode 100644 index 0000000..8671192 --- /dev/null +++ b/.github/probe-api.mjs @@ -0,0 +1,19 @@ +// Probe: connect @pezkuwi/api to the dev node and report why it does not become ready. +import { ApiPromise, WsProvider } from '@pezkuwi/api'; + +const provider = new WsProvider('ws://127.0.0.1:30333'); +const timer = setTimeout(() => { console.log('PROBE: not ready after 60s'); process.exit(2); }, 60_000); + +for (const ext of [undefined, { AuthorizeCall: { extrinsic: {}, payload: {} } }]) { + console.log(`PROBE: create with signedExtensions=${ext ? 'AuthorizeCall' : 'none'}`); + try { + const api = await ApiPromise.create({ provider, signedExtensions: ext, throwOnConnect: true, throwOnUnknown: true }); + console.log('PROBE: ready', api.runtimeVersion.specName.toString(), api.runtimeVersion.specVersion.toString()); + console.log('PROBE: extensions', api.registry.signedExtensions.join(',')); + console.log('PROBE: has bounties', !!api.tx.bounties, 'metadata v', api.runtimeMetadata.version); + } catch (e) { + console.log('PROBE: error', e?.stack || e); + } +} +clearTimeout(timer); +process.exit(0); diff --git a/.github/workflows/slow-probe.yml b/.github/workflows/slow-probe.yml index a3b59a7..f283dd7 100644 --- a/.github/workflows/slow-probe.yml +++ b/.github/workflows/slow-probe.yml @@ -20,6 +20,8 @@ jobs: done echo; docker logs node 2>&1 | tail -5 - run: corepack enable && yarn install --immutable + - name: api probe + run: node .github/probe-api.mjs 2>&1 | tail -40 - name: Bounties spec (4 min cap) run: timeout -s INT 240 yarn test:one :Bounties.slow. ; echo "rc=$?" - name: CreateAccount spec (4 min cap)