Bors with GitHub Workflows

Example PR: https://github.com/CAD97/pointer-utils/pull/3
Staging commit: https://github.com/CAD97/pointer-utils/commit/ccc77ebae512f631228e5be5b426802fe0cbbdfe

I've been unable to get bors to listen for the status reported by GitHub Actions. Has anyone else gotten bors to work with GitHub Workflows based CI? Am I just using the wrong status name, or is this an issue on bors' end?

1 Like

I figured out the string I needed to ask bors to listen for.

Given a workflow job:

name: Workflow
jobs:
  job-identifier:
    name: Job
    steps: []

you need to listen for the status "Job", though it shows up as Workflow / Job in most UI elements.

This means that your job names should be unique even between workflows (which is probably a good idea anyway).

1 Like

How does this work with matrix jobs? Do they all report their status under the same key (it looks like they don't to me)?

Also, is there any easy way to just specify the workflow as a whole? Having to synchronize this all the time with the jobs would be annoying.

Is there any way to easily check the status names myself on a PR?

Nope, each job in the matrix has a unique name. Any wildcards don't work either because they only require a single job to succeed.

There're indeed only two known/common ways:

  1. Introduce a dummy job which depends on all other jobs and that's the one you use as status, cf. https://github.com/taiki-e/pin-project/blob/3795d2db7abc4e04b3c1ec96e1542c55705ea3fc/.github/workflows/ci.yml
  2. Spell them all out in bors.toml which is annoying as you say

I took a similar approach to 1 but with slightly different summary job since the mentioned example did not work for me (the jobs were being skipped), see https://github.com/pyvisa/pyvisa-py/pull/236/files

(note that it would make more sense to test for needs.test.result != 'success' rather than == 'failure')