Open eliabieri opened 9 months ago
This is intermittent but common for us. I don't think it's every other time, it will often fail many times in a row, but it does sometimes succeed.
I've made some tweaks on the assumption that this is GHA keeping a "hot" function around to run the workflows, and so docker's already running and messing with things. None of this is robustly tested across test failures or concurrent workflows from other branches.
Try to start up more carefully
- name: start or reset supabase db server
run: |
set +e
supabase status
if [ $? -eq 0 ]; then
echo "Supabase is already running, resetting database..."
supabase db reset
else
echo "Supabase is not running, starting database..."
supabase db start
fi
set -e
Try to clean up by stopping supabase afterwads even in cases of test failures
- name: cleanup supabase db service
if: always()
run: npx supabase stop
and also limit concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Bug report
Describe the bug
supabase start
fails randomly due to a port already being in use. It seems to be a timing issue as it only happens every other time when running the Github Action below.This is the error generated:
To Reproduce
jobs: test: runs-on: ubuntu-latest