docket-ship
Contents

Checking docs in CI

Fail a pull request when its docs have errors, with one step in any CI system.

docket-ship check exits 1 when the docs have errors, so a CI job can fail a pull request that breaks them. Pin the version you use, so a new release doesn't change the rules under you.

GitHub Actions

- name: Check the docs
  run: |
    curl -fsSL -o docket-ship \
      https://github.com/tralk331/docket-ship/releases/download/v0.5.0/docket-ship-linux-x64
    chmod +x docket-ship
    ./docket-ship check

Add it as a step after actions/checkout. The binary has no dependencies, so nothing else needs installing.

Warnings

By default only errors fail the run: a broken link, a missing id, a spec citing a superseded decision. Warnings, such as a decision a spec doesn't cite yet or a spec naming a function that no longer exists, are printed but pass.

To fail on warnings too, use --strict:

./docket-ship check --strict

--strict suits a project whose docs are already clean. On a project you are still migrating, start without it and turn it on once the warnings are gone.

Other CI systems

Any CI that can download a file and run it works the same way: fetch the binary for the runner's platform from the releases, make it executable, and run docket-ship check from the project root. Each release lists the SHA-256 of every binary in checksums.sha256 if you want to verify the download.

Exit code Means
0 No errors (and no warnings, with --strict)
1 Errors, or warnings with --strict
3 Not a docket-ship project: no docket-ship.cfg was found

Edit this page on GitHub