Skip to content

Commit

Permalink
Move test runner into separate shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Mar 2, 2024
1 parent c938f45 commit fdcd861
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,7 @@ jobs:

# retries are added due to test failures with dependencies
- name: Run tests
run: |
bash -c '
retries=0
until [ $retries -ge 5 ]
do
echo "Running Test Suite...."
swift test -v
exit_code=$?
if [ $exit_code -eq 0 ]; then
echo "Test Succeeded"
break
else
echo "Test Suite Failed. Retrying..."
((retries=retries+1))
fi
done
'
run: script/run_tests.sh

# - name: Stop local test server
# run: docker-compose -p xmtp-ios -f dev/local/docker-compose.yml down
18 changes: 18 additions & 0 deletions script/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

retries=0
until [ $retries -ge 5 ]
do
echo "Running Test Suite...."
swift test -v

exit_code=$?

if [ $exit_code -eq 0 ]; then
echo "Test Succeeded"
break
else
echo "Test Suite Failed. Retrying..."
((retries=retries+1))
fi
done

0 comments on commit fdcd861

Please sign in to comment.