Two lines, then a full run.
Bellwether needs one unselected run to build its map. Until that finishes it selects nothing and your pipeline behaves exactly as it did before.
Install
curl -sSL https://get.bellwether.example | sh
bellwether login
The binary is about 14 MB and has no runtime dependencies. It writes to
.bellwether/ in the repository root, which you should commit.
Wire it into the pipeline
GitHub Actions, as an example. The shape is the same everywhere:
- run: bellwether select --diff ${{ github.event.pull_request.base.sha }}
- run: bundle exec rspec $(cat .bellwether/selected)
The first command writes the selection to .bellwether/selected and the skip
list beside it. The second is your existing test command, reading that file instead of a
glob. Nothing else in the pipeline changes.
The first run
Run bellwether record once against a full suite, on a branch, out of
everybody’s way. It takes as long as your suite takes plus about four percent. When
it finishes, select starts returning a real subset.
Until then select returns every test. That is deliberate: an unbuilt map is
indistinguishable from a map that says nothing is affected, and the safe reading of the
two is the same.
Reading the skip list
$ bellwether why api/webhooks/retry_spec.rb
skipped api/webhooks/retry_spec.rb
map recorded 2 hours ago, run 8841
loads 12 files, none of them in this diff
nearest packages/core/result.ts (not loaded by this test)
Every test on every commit answers why, and the answer is one of exactly
eight. There is no ninth verdict and there is no partial credit: a test is never forty
percent selected.
reachesselected, the map puts it on a changed filestaleselected, its map entry is older than the testunmappedselected, it has never been recordedpinnedselected, an always-run rule names itunreachableskipped, no path from the diffquarantinedskipped, it disagreed with itselfexcludedskipped, your config excludes itother shardskipped, it runs on a different machine
Four of the eight are ways of saying run it anyway, which is the direction the tool is built to fail in. The same eight are why every photograph on this site is printed at eight steps of one ink and no ninth.
Turning it off
Delete the two lines. There is no uninstall, no data migration and no export window.
Everything Bellwether knows about your repository lives in
.bellwether/ and in an account you can delete from the dashboard.
Record one suite, then read the skip list before you let it skip anything.
Start a trial