Your agent already ran the tests. Let that run be the check.
shipcheck runs your checks on your machine, natively in a sandbox or as your GitHub Actions workflows in containers, keeps the result for that exact git tree, and posts the required checks. A PR whose tree was already tested gets its checks at once from the stored result. The checks shipcheck runs use none of your GitHub Actions minutes, so those can go to releases and deploys. Your workflows still run on GitHub when a commit lands on main, as a second check.
$ brew install gabrielkoerich/tap/shipcheck$ cargo install shipcheck$ curl -fsSL https://shipcheck.run/install.sh | sh$ cargo install --git https://github.com/gabrielkoerich/shipcheck shipcheckHomebrew and the install script install the release binary, signed and notarized on macOS. Then run shipcheck init in your repository. Quickstart
- shipcheck/testRequired, success
- shipcheck/lintRequired, success
- shipcheckPassed, tree already tested
How it works
- The agent runs
shipcheck runinstead of its tests. shipcheck tests the working copy as it is, in its own clone, and the agent commits it withshipcheck commit. The commit's tree already ran, so its check needs no new run. A commit nobody tested starts a background run from the pre-push hook when you push it, or from the post-commit hook withon = ["push", "commit"]. - shipcheck reads what to run from main.
shipcheck.tomland the workflows come from the default branch the remote reports, never from the branch, so a PR cannot change what checks it. - It runs the checks in a warm, clean checkout. A copy-on-write clone of the tree keeps the build caches. In host mode the commands run natively in an OS sandbox. In act mode act runs the workflow jobs in Docker, or a job you pick runs in a colima VM of its own, and markers added to shipcheck's own copy of each workflow report every job.
- It keeps the result for the tree. The key is the git tree plus the config, the workflows, the tool versions and the images, so a rebase or a squash with the same tree needs no new run.
- The PR gets its checks. shipcheck posts one check per job, such as
shipcheck/test, as GitHub Actions does, and branch protection requires them. GitHub still runs your workflows on main after the merge.
How long a run takes, against GitHub Actions on the same commits.
What the repository owner sets up
One file says which checks a PR must pass. shipcheck init writes it from your workflow jobs.
# shipcheck.toml
runner = "host"
on = ["push", "commit"]
[host.checks]
test = "cargo test"
clippy = "cargo clippy --all-targets -- -D warnings"
shipcheck initwrites the file, installs the hooks, and offers to run hosted Actions only on main.- The shipcheck App posts the checks. Install it on the repository.
shipcheck initandshipcheck installsign each machine in. Post the checks - A ruleset requires the job checks on main, so a PR merges only after every job passes.
shipcheck initcan create it with yourghlogin. - Each teammate runs
shipcheck installonce per clone.
What it stops, and what it does not
It stops
- An agent that reports a pass it never ran. Only shipcheck posts the check, from runs it started.
- A PR that edits its workflows or
shipcheck.tomlto skip work. - A pass from before main's config changed.
- A pass from files that were never committed.
It does not stop
- An agent that deletes or weakens a test. Tests are part of the PR, so review them.
- Differences between this machine, or act's containers, and GitHub's runners. The hosted run on main catches them.
- In act mode, jobs that act cannot run, such as macOS jobs or a job that mounts a loop device.