Skip to the content

Using it

In CI

slowship can gate a build: the exit code is 2 when the verdict is held, so a pipeline stops before a package that does more than it says reaches production.

#Exit codes

CodeMeans
0Cleared to sail, or ready after a glance. Nothing is held.
2Held in port. Something does more than it says.

The nightly watch is the exception: it always exits cleanly and leaves the verdict in the report.

#Flags that suit CI

When output is piped, as it is in CI, slowship prints plain text by itself. --plain forces it anywhere.

#An example pipeline

A sketch for GitHub Actions. Install your dependencies with scripts off, so nothing runs before it’s been read, then let slowship read them:

- uses: actions/checkout@v4
- uses: actions/setup-node@v4
  with:
    node-version: 22
- run: npm ci --ignore-scripts
- run: git clone --depth 1 https://github.com/nirajkhetre/slowship ../slowship && npm --prefix ../slowship install
- run: node ../slowship/bin/slowship.js . --packages-only --no-model --json slowship.json

Adjust it to your own pipeline. slowship reads what’s installed in node_modules, so install first. Installing with --ignore-scripts means a package’s install script can’t run before slowship has read it.

#Clearing in CI

Clears are kept in slowship’s memory folder, which a fresh CI machine doesn’t have. Point SLOWSHIP_HOME at a folder you cache between runs if you want clears and memory to carry over. Clears stay tied to exact bytes, so a cached clear never covers changed code.

Suggest a change to this page

Esc