From ec8ff7f558423af10db993e4168891f7c5466e29 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 18 Dec 2024 13:57:00 -0800 Subject: [PATCH] [ci] Fix "Check test expectations" step so it checks out the target branch --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 023e326d92125..58aa8ea045154 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,14 +52,15 @@ jobs: echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG echo "final config:" cat $EM_CONFIG - - name: Check test expectations on main + - name: Check test expectations on target branch + if: github.event_name == 'pull_request' run: | - git checkout origin/main + git checkout ${{ github.base_ref }} # Hack to honor changes to rebaseline_tests.py in the current PR git checkout - ./tools/maint/rebaseline_tests.py ./bootstrap if ! ./tools/maint/rebaseline_tests.py --check-only; then - echo "Test expectations are out-of-date on the main branch." + echo "Test expectations are out-of-date on the target branch." echo "You can run `./tools/maint/rebaseline_tests.py --new-branch`" echo "and use it to create a seperate PR." exit 1