If you're unfamiliar with Bors, check out this post for a short primer.
You will also need to sign up for app.bors.tech to follow along here. Do this and give the Bors service permission to access at least the repo you're using to test with.
Here's a GitHub Action that uses nightly Rust to run cargo check
. There are two important parts of this workflow.
staging
and trying
. We never push to these branches manually. We only submit PRs.Bors
because I only have one that I care about, but you can have many.name: Bors Runson:push:branches:- staging- tryingjobs:test:name: Borsruns-on: ubuntu-lateststeps:- name: Checkout Repouses: actions/checkout@master- name: Install nightly toolchainuses: actions-rs/toolchain@v1with:toolchain: nightlyoverride: truecomponents: rustfmt, clippy- name: Run cargo checkuses: actions-rs/cargo@v1with:command: check
Secondarily, we need a bors.toml
in the root of our project. This toml file will include any config we want to use. In this case, it specifies which Job statuses to pay attention to for merging purposes. We've specified the name here that matches the job we care about in our GitHub Action above.
status = ["Bors"]
That's it, now you can bors r+
to your heart's content.
If you're working in the JS ecosystem, you'll want to pair the Bors workflow with Changesets to manage npm semver releases via PR as well.