SuperAPI AI Directory

fix-test-cli-ci

Testing & quality

View repository

Updated 10-15 23:47

About this skill

Fix test-cli.yml CI Failures

When to Use

  • .github/workflows/test-cli.yml or the Test CLI workflow failed in CI.
  • inso bundle tests fail locally or in GitHub Actions.
  • You suspect node module/runtime differences between Node.js and Electron.

Procedure

  1. Start with the failing CI evidence.
    • Use the provided logs or workflow run link to identify whether the failure happened during the test:bundle run, 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.
  2. Ensure Node.js native dependencies are installed (not Electron-targeted variants):
    npm run install-libcurl-node
    
  3. Build insomnia-inso to generate dist:
    npm run build -w insomnia-inso
    
  4. Start the smoke-test echo server used by the CLI tests:
    npm run serve -w insomnia-smoke-test
    
  5. In another terminal, run the bundled CLI test suite:
    npm run test:bundle -w insomnia-inso
    
  6. 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 with npm run install-libcurl-node.
    • Connection failures to http://localhost:4010 usually mean the smoke-test server is not running.
    • Missing dist output or missing binaries/inso usually means npm run build -w insomnia-inso or the package step needs to be rerun.
  • Success criteria:
    • npm run test:bundle -w insomnia-inso exits successfully and Vitest reports the inso dev bundle tests as passing.
    • If validating the packaged binary path, npm run test:binary -w insomnia-inso also exits successfully.

Teardown

  • Stop the npm run serve -w insomnia-smoke-test process once validation is complete.
  • Reinstall the electron-targeted libcurl binary for continued Electron development:
    npm run install-libcurl-electron