Fix Test CLI CI
Testing & Qualityfix-test-cli-ciFix Test CLI CI is an Agent Skill for testing & quality published in the Kong/insomnia repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
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.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Kong/insomnia/blob/HEAD/.claude/skills/fix-test-cli-ci/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/fix-test-cli-ci, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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