name: fix-test-cli-ci description: 'Debug failures from the test-cli.yml workflow locally. Use when insomnia-inso bundle tests fail in CI, especially node-vs-electron dependency/runtime mismatches.' argument-hint: 'Provide the failing test-cli.yml logs, a link to the failing workflow run, or the failing test name from npm run test:bundle -w insomnia-inso'
Fix test-cli.yml CI Failures
When to Use
.github/workflows/test-cli.ymlor theTest CLIworkflow failed in CI.insobundle tests fail locally or in GitHub Actions.- You suspect node module/runtime differences between Node.js and Electron.
Procedure
- Start with the failing CI evidence.
- Use the provided logs or workflow run link to identify whether the failure happened during the
test:bundlerun, the packaged binary run, or the build/package setup before the tests. - Note the failing test name and the first actionable error message before reproducing locally.
- Use the provided logs or workflow run link to identify whether the failure happened during the
- Ensure Node.js native dependencies are installed (not Electron-targeted variants):
npm run install-libcurl-node - Build
insomnia-insoto generatedist:npm run build -w insomnia-inso - Start the smoke-test echo server used by the CLI tests:
npm run serve -w insomnia-smoke-test - In another terminal, run the bundled CLI test suite:
npm run test:bundle -w insomnia-inso - If the CI failure was in the packaged binary path or the bundle suite passes locally, run:
npm run test:binary -w insomnia-inso
Notes
- Keep the smoke-test server running while bundle tests execute.
- Common failure patterns:
- Errors involving
@getinsomnia/node-libcurl,NODE_MODULE_VERSION,dlopen, or native module loading usually mean the Node-targeted libcurl binary needs to be reinstalled withnpm run install-libcurl-node. - Connection failures to
http://localhost:4010usually mean the smoke-test server is not running. - Missing
distoutput or missingbinaries/insousually meansnpm run build -w insomnia-insoor the package step needs to be rerun.
- Errors involving
- Success criteria:
npm run test:bundle -w insomnia-insoexits successfully and Vitest reports theinso dev bundletests as passing.- If validating the packaged binary path,
npm run test:binary -w insomnia-insoalso exits successfully.
Teardown
- Stop the
npm run serve -w insomnia-smoke-testprocess once validation is complete. - Reinstall the electron-targeted libcurl binary for continued Electron development:
npm run install-libcurl-electron