From f1e6fe28b41a05b571e14a608a2c0ae726e4b226 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Wed, 22 May 2024 23:29:09 +0000 Subject: [PATCH] Fix CI runs on develop. This can't be easily verified until it's merged, however I have high confidence that this should fix it as we've done similar fallback syntax for env variables in the past (e.g. '||') and 'origin/develop' was the value previously used for the base commit when computing affected tests. --- .github/workflows/unit_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ecc0ffa5804..eca856e5fe8 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -76,8 +76,8 @@ jobs: id: compute-test-matrix env: compute_all_targets: ${{ contains(github.event.pull_request.title, '[RunAllTests]') }} - # See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request. - base_commit_hash: ${{ github.event.pull_request.base.sha }} + # See: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request. Defer to origin/develop outside a PR (such as develop's main CI runs). + base_commit_hash: ${{ github.event.pull_request.base.sha || "origin/develop" }} # https://unix.stackexchange.com/a/338124 for reference on creating a JSON-friendly # comma-separated list of test targets for the matrix. run: |