Skip to content

Commit b2e87ae

Browse files
committed
Fix GitHub Action tests
1 parent 2876e5c commit b2e87ae

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/run

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ set_up()
3737

3838
# Initialize git
3939
git init -b develop
40+
git config --local user.email "action@github.com"
41+
git config --local user.name "GitHub Action"
4042
git add . && git commit -m "Initial commit"
4143
}
4244

@@ -58,20 +60,18 @@ assert()
5860
MESSAGE=$@
5961

6062
echo "FAILED: $MESSAGE"
61-
exit $CODE
63+
exit 1
6264
}
6365

6466
get_hash()
6567
{
6668
md5sum "$1" | awk '{print $1}'
6769
}
6870

69-
# Begin testing
70-
set +e
71-
7271
# Verify the tests
7372
assert "-d $TESTS" "Unable to locate tests"
7473

74+
# Begin testing
7575
for FILE in "$TESTS"/*; do
7676

7777
NAME=`basename "$FILE"`
@@ -80,7 +80,9 @@ for FILE in "$TESTS"/*; do
8080
set_up > /dev/null 2>&1
8181

8282
# Execute the test
83+
set +e
8384
. $FILE
85+
set -e
8486

8587
RESULT=$?
8688
if [ $RESULT -ne 0 ]; then
@@ -89,6 +91,7 @@ for FILE in "$TESTS"/*; do
8991
fi
9092

9193
echo "$NAME passed."
94+
echo ""
9295
done
9396

9497
echo "All tests passed!"

0 commit comments

Comments
 (0)