From f1e6fe28b41a05b571e14a608a2c0ae726e4b226 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Wed, 22 May 2024 23:29:09 +0000 Subject: [PATCH 1/2] 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: | From 97cf0e41a85e6cc897a04e5c2efdc071e5a799d7 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Thu, 23 May 2024 10:21:20 -0700 Subject: [PATCH 2/2] Update unit_tests.yml Replace double quotes with single since single seems to be the proper one to use for strings in these contexts. --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index eca856e5fe8..5256513d790 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -77,7 +77,7 @@ jobs: 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. 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" }} + 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: |