setup-cli
setup-cli copied to clipboard
Caching supabase start
I'd like to make supabase start faster in my github actions CI. I'm running the following workflow in github actions:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup Supabase
uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase
run: supabase start
And the last step supabase start takes about 3min 30secs. I'm running supabase start (and not supabase db start) to be able to retrieve a service role key with supabase status afterwards.
Is it possible to somehow reduce the time it takes for this startup, with caching maybe? Has someone set this up properly already? Would be nice to add this to the documentation if so.
have the same issue, i am using:
- name: Test (pnpm)
run: |
# Start local Supabase
supabase db start
# Export env vars for Next.js/tests
supabase status -o env > .env
source .env
# run tests
pnpm test
my tests don't have the env variables - if i use supabase start instead of supabase db start, they have