Reference
Configuration
Shipcheck works without configuration. When you need to change something, add a .shipcheck.yml to the project root.
Shipcheck looks for .shipcheck.yml (or .shipcheck.yaml) in the directory being checked. Use --config path/to/file.yml to load a different file. Run shipcheck init to generate a commented starting point.
version: 1checks: tests: true build: true environment: true readme: true license: false ci: false git_clean: trueseverity: version: error # a stale version blocks shipping readme: warngit: protected_branches: - main - masterenvironment: required: - DATABASE_URL - API_KEY files: - .env - .env.localcommands: tests: npm run test:ci build: - npm run build - go build ./... timeout: 10mversion
The config format version. Currently 1. Required so that future formats can change without breaking existing files.
checks
Turn checks on or off. Every check is on by default, and disabled checks don't appear in the report. Keys use underscores; the dotted IDs from the JSON output (git.clean) are accepted too.
| Key | Check |
|---|---|
git_repo | Git repository |
git_clean | Working tree |
git_branch | Branch |
tests | Tests |
build | Production build |
environment | Environment |
readme | README |
license | License |
version | Version |
ci | CI |
severity
Change how a check's problems are reported, without turning it off.
errorturns warnings into failures. Use it for things you want to enforce, such asci: error.warnturns failures into warnings. The problem is still shown, but doesn't block shipping, for examplegit_clean: warnwhile you iterate.
Passing and skipped checks are unaffected. warning is accepted as an alias for warn.
severity: ci: error # require CI license: error # require a license git_clean: warn # allow uncommitted changesgit
protected_branches lists the branches you ship from. The branch check warns when you run Shipcheck on any other branch. Without this setting, Shipcheck uses main or master if either exists.
git: protected_branches: - main - releaseenvironment
Variables listed in .env.example, .env.sample or .example.env are required automatically. Use required to add more. Each must have a non-empty value in the process environment or in one of files (default: .env).
environment: required: - DATABASE_URL - STRIPE_SECRET_KEY files: - .env - .env.productionNames must be valid variable names (A-Z, 0-9, _). Files must be relative paths inside the project. Values are never printed.
commands
Override the detected test and build commands. Each can be a single command or a list; commands in a list run in order and stop at the first failure. timeout applies to each command (default 10m).
commands: tests: - go -C api test ./... - npm --prefix web test build: make release timeout: 15mFound a mistake? Edit this page on GitHub