Skip to content

Commit d157bd5

Browse files
Soupstrawneilmayhew
andcommitted
Added undefined check
Co-authored-by: Neil Mayhew <neil.mayhew@iohk.io>
1 parent 12e4531 commit d157bd5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/haskell.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,3 +630,18 @@ jobs:
630630
echo "Commit $TAG was not found on the master-artifacts branch of formal-ledger-specifications."
631631
exit 1
632632
}
633+
undefined-check:
634+
name: Check that there are no additions of `undefined`s in the PR diff
635+
runs-on: ubuntu-latest
636+
if: ${{ github.base_ref != '' && github.ref != '' }} # Only true for PRs
637+
638+
steps:
639+
- uses: actions/checkout@v4
640+
- name: Check for `undefined`s in the diffs
641+
run: |
642+
PR_TARGET=${{ github.base_ref }}
643+
git fetch origin -n --refmap= +$PR_TARGET:pr-target
644+
if git diff pr-target '*.hs' | grep '^\+.*undefined'; then
645+
echo 'The diff must not contain any `undefined` values'
646+
false
647+
fi

0 commit comments

Comments
 (0)