-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.38 KB
/
LuaScripts.yml
File metadata and controls
57 lines (49 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Lua Scripts
on: push
jobs:
Scripts:
name: "Unit Test Scripts"
runs-on: ubuntu-latest
steps:
- name: Install Unit test dependencies
run: |
sudo apt-get update
sudo apt-get install -y lua5.4 mtools p7zip-full
- uses: actions/checkout@v4
- name: Run script unit tests
run: |
set -e
WD=$(pwd)
TEST=$(find meta/test -name test.sh -executable -print)
for file in $TEST; do
echo
echo "### Running $file ###"
echo
cd $(dirname $file)
if ! ./$(basename "$file"); then
echo "Error: Script $file failed!"
cd "$WD"
exit 1
fi
cd $WD
done
- name: Squish all scripts
run: |
find . -name "*.LUA" -type f -exec util/SQUISH.LUA {} +
- name: Run unit tests again on squished versions of script
run: |
set -e
WD=$(pwd)
TEST=$(find meta/test -name test.sh -executable -print)
for file in $TEST; do
echo
echo "### Running $file ###"
echo
cd $(dirname $file)
if ! ./$(basename "$file"); then
echo "Error: Script $file failed!"
cd "$WD"
exit 1
fi
cd $WD
done