Skip to content

Commit

Permalink
verify that postgres has not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Jan 18, 2024
1 parent 418784c commit 30f8c5c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,34 @@ jobs:
path: .tmp
retention-days: 1

pr-test:
# general PR tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: false

- name: Verify that postgres/ was not changed unintentionally
run: |
title="${{ github.event.pull_request.title }}"
required_prefix="Update bundled PostgreSQL"
if [[ $title == $required_prefix* ]];
exit 0
fi
git diff --quiet \
${{ github.event.pull_request.base.sha }} \
${{ github.event.pull_request.head.sha }}
if [ $? != 0 ]; then
echo "postgres/ submodule has been changed,"\
"but PR title does not indicate that"
echo "(it should start with '$required_prefix')"
exit 1
fi
test-conclusion:
needs: [cargo-test, python-test, collect]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 30f8c5c

Please sign in to comment.