Skip to content

Commit

Permalink
Make tests CI friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardCooke committed Sep 4, 2024
1 parent d4cba4f commit 882dcfd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ jobs:
- name: Run tests.sh
run: ./test.sh
working-directory: test
env:
IS_CI: "1"
- uses: actions/upload-artifact@v4
with:
name: Test Results
path: test/results-*.tgz
4 changes: 3 additions & 1 deletion test/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,13 @@ spinner_wait() {
SPINNER=("${G}${NOCOLOR}" "${G}${NOCOLOR}" "${G}${NOCOLOR}" "${G}${NOCOLOR}" "${B}${NOCOLOR}" "${B}${NOCOLOR}" "${B}${NOCOLOR}" "${B}${NOCOLOR}")
POS=0

[ "$IS_CI" == "1" ] && echo -e "$TEXT"

while (kill -0 $PID 1> /dev/null 2> /dev/null)
do
(( POS++ ))
[ $POS == 8 ] && POS=0
echo -en "\r${SPINNER[$POS]} $TEXT"
[ "$IS_CI" != "1" ] && echo -en "\r${SPINNER[$POS]} $TEXT"
sleep .1
done
wait $PID
Expand Down

0 comments on commit 882dcfd

Please sign in to comment.