Skip to content

Commit c550c95

Browse files
author
Karl-Johan Alm
committed
replace travis with Github Actions
1 parent aa5b0a1 commit c550c95

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: GitHub Actions Check
2+
run-name: ${{ github.actor }} Checks 🚀
3+
on: [push, pull_request]
4+
jobs:
5+
All-Checks:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- run: scripts/link-format-chk.sh
10+
- run: scripts/buildtable.pl >/tmp/table.mediawiki || exit 1
11+
- run: scripts/diffcheck.sh

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

scripts/diffcheck.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/after.diff || true
4+
if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null; then
5+
diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/before.diff || true
6+
newdiff=$(diff -s /tmp/before.diff /tmp/after.diff -u | grep '^+')
7+
if [ -n "$newdiff" ]; then
8+
echo "$newdiff"
9+
exit 1
10+
fi
11+
else
12+
echo 'Cannot build previous commit table for comparison'
13+
fi

scripts/link-format-chk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
ECODE=0
1010
FILES=""
11-
for fname in $(git diff --name-only HEAD $(git merge-base HEAD master)); do
11+
git fetch origin master
12+
for fname in $(git diff --name-only HEAD $(git merge-base HEAD origin/master)); do
1213
if [[ $fname == *.mediawiki ]]; then
1314
GRES=$(grep -n '](http' $fname)
1415
if [ "$GRES" != "" ]; then

0 commit comments

Comments
 (0)