Skip to content

Commit 8210e89

Browse files
committed
Added new GitHub workflow job: 'Unit Test Squished Scripts'.
1 parent 3795edb commit 8210e89

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/LuaScripts.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,34 @@ jobs:
3030
exit 1
3131
fi
3232
33+
cd $WD
34+
done
35+
36+
Squish:
37+
name: "Unit Test Squished Scripts"
38+
runs-on: ubuntu-latest
39+
needs: Scripts
40+
41+
steps:
42+
- name: Squish all scripts
43+
run: |
44+
find test -name "*.LUA" -executable -exec util/SQUISH.LUA {} +
45+
46+
- name: Run unit tests again on squished versions of script
47+
run: |
48+
set -e
49+
WD=$(pwd)
50+
TEST=$(find test -name test.sh -executable -print)
51+
for file in $TEST; do
52+
echo
53+
echo "### Running $file ###"
54+
echo
55+
cd $(dirname $file)
56+
if ! ./$(basename "$file"); then
57+
echo "Error: Script $file failed!"
58+
cd "$WD"
59+
exit 1
60+
fi
61+
3362
cd $WD
3463
done

0 commit comments

Comments
 (0)