Skip to content

Commit

Permalink
Fastrack temporary failure scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Mar 2, 2024
1 parent 8d7cc92 commit 5b67fe0
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,28 @@ jobs:
- name: Checkout project sources
uses: actions/checkout@v3

- name: Install docker
run: brew install docker docker-compose colima
# - name: Install docker
# run: brew install docker docker-compose colima

- name: Start colima
run: colima start
# - name: Start colima
# run: colima start

- name: Start Docker containers
run: dev/up
# - name: Start Docker containers
# run: dev/up

# retries are added due to test failures with dependencies
- name: Run tests
run: |
retries=0
until [ $retries -ge 5 ]
do
echo "Running Test Suite - Attempt ($retries)"
swift test -v
(
echo "Running Test Suite - Attempt ($retries)"
if [ $retries -eq 1 ]; then
echo "Simulating failure for testing purposes..."
exit 1
fi
)
if [ $? -eq 0 ]; then
echo "Test Succeeded"
break
Expand All @@ -50,5 +54,5 @@ jobs:
fi
done
- name: Stop local test server
run: docker-compose -p xmtp-ios -f dev/local/docker-compose.yml down
# - name: Stop local test server
# run: docker-compose -p xmtp-ios -f dev/local/docker-compose.yml down

0 comments on commit 5b67fe0

Please sign in to comment.