supabase-community / database-build

In-browser Postgres sandbox with AI assistance (formerly postgres.new)
https://database.build
Apache License 2.0
2.49k stars 197 forks source link

Can we use it in GitHub Action #124

Closed kubosuke closed 4 weeks ago

kubosuke commented 1 month ago

Feature request

Is your feature request related to a problem? Please describe.

in our repo we're running CI pipeline to run unittest that depends on PostgresDB. to setup database in github action it takes time , to improve CI pipeline speed it'd be nice if we could integrate github action and database.build

Describe the solution you'd like

able to connect database.build from GitHub Action

Describe alternatives you've considered

Additional context

gregnr commented 1 month ago

Hey @kubosuke thanks for the issue. To confirm, are you hoping to point your GitHub action to a temporary Postgres DB hosted on database.build? The difficulty with this is that database.build runs Postgres databases directly in your browser via PGlite. This means that in order to interact with the database, you need an actual browser running (which is technically possible in a CI environment but probably not what you're looking for).

Instead you may be interested in connecting directly to PGlite itself within your runner which I've heard other folks doing. You can either connect directly to PGlite (via JS interface), or combine it with pg-gateway to make it behave like a real TCP server.

Let me know if this helps!

kubosuke commented 4 weeks ago

Thanks, sounds great, I'll look into them ~ 🙏