How to test nextjs app against dockerized postgres container (Vercel)

I have a ct3a deployed to Vercel's free tier. I was wondering if it's possible to spin up a postgres container in Vercel's CI and run some tests before creating deployment previews/etc.
2 Replies
hoshi
hoshiOP5mo ago
Also open to using Github actions. Something like this seems promising https://gist.github.com/2color/537f8ef13ecec80059abb007839a6878
Gist
How to run integration tests with PostgreSQL and Prisma on GitHub A...
How to run integration tests with PostgreSQL and Prisma on GitHub Actions - test.yaml
smoose
smoose5mo ago
If you’re looking for ephemeral databases, I’m not sure what you could do besides running docker containers locally and testing. But if you want to setup a serverless database on Vercel strictly for testing, you could do that: https://vercel.com/docs/storage/vercel-postgres Though I’d imagine that would cause more overhead needing to migrate the schema, reseed, and cleanup of past testing. I’m no pro with databases and testing, but those are some of my initial thoughts. Please feel free to bounce ideas back and forth. I’m trying to put my neck out there to be able to learn more about the full stack 😅
Vercel Postgres
Vercel Postgres is a serverless SQL database designed to integrate with Vercel Functions and your frontend framework.
Want results from more Discord servers?
Add your server