Skip to content

Commit fdb2c73

Browse files
committed
In "tests fail on old code", the old code must be the merge base
Otherwise we can run into weird inconsistencies with the partial checkout, when the base reference of the PR is sufficiently older than main. We already changed the diff to compare against merge base, but forgot to change the checkout itself.
1 parent 66f42a3 commit fdb2c73

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/tests-fail-on-old-code.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ jobs:
127127
- name: Revert code changes
128128
if: steps.check.outputs.should_run == 'true'
129129
run: |
130-
git checkout base -- $CODE_PATHS
130+
set -eu
131+
132+
git checkout $(git merge-base base @) -- $CODE_PATHS
131133
git status
132134
133135
- name: Build TimescaleDB

0 commit comments

Comments
 (0)