From 967e0767885d146a55d95641e04d2cb6ba486f0b Mon Sep 17 00:00:00 2001 From: Michael McLoughlin Date: Sun, 1 May 2022 14:11:37 -0700 Subject: [PATCH] .github: add "required" ci job (#276) Github branch protection rules allow required checks to be specified, but they must be mentioned by name. This is a little annoying for jobs with names that change, such as test jobs that depend on the go version. This PR fixes this by creating a stub job in the CI workflow that simply depends on the test and lint workflows. This job can then be listed as a required check, and has the effect of aggregating the dependent checks into one. --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce7997b..6305cef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,16 @@ on: schedule: - cron: "17 12 * * 6" jobs: + # Required job is a stub which only runs when other dependencies complete + # successfully. This is intended to be listed as a required check in a branch + # protection rule. + required: + needs: + - test + - lint + runs-on: ubuntu-latest + steps: + - run: "true" test: strategy: matrix: