Skip to content

Commit

Permalink
Merge pull request #1578 from achow101/fix-ci
Browse files Browse the repository at this point in the history
ci: Update diff checks so that the task actually works
  • Loading branch information
jonatack committed May 1, 2024
2 parents 602cd67 + 09439bb commit 253dd09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/github-action-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ jobs:
Link-Format-Checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: scripts/link-format-chk.sh
Build-Table-Checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: scripts/buildtable.pl >/tmp/table.mediawiki || exit 1
Diff-Checks:
name: "Diff Checks (fails until number assignment)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: scripts/diffcheck.sh
3 changes: 3 additions & 0 deletions scripts/diffcheck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

scripts/buildtable.pl >/tmp/table.mediawiki 2> /dev/null
diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/after.diff || true
if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null; then
diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/before.diff || true
Expand All @@ -8,6 +9,8 @@ if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null
echo "$newdiff"
exit 1
fi
echo "README table matches expected table from BIP files"
else
echo 'Cannot build previous commit table for comparison'
exit 1
fi

0 comments on commit 253dd09

Please sign in to comment.