4 ms·
FWIW, if you use GitHub Actions for CI/CD they make it super easy to start up a fresh postgres instance: https://docs.github.com/en/actions/guides/creating-post
by hn_throwaway_99 6y ago
FWIW, if you use GitHub Actions for CI/CD they make it super easy to start up a fresh postgres instance: https://docs.github.com/en/actions/guides/creating-postgresql-service-containers https://docs.github.com/en/actions/guides/creating-postgresq...
We do this on every build: start a fresh postgres instance, run all of our DB migrations to get us to the latest DB schema, and then run our test suite.
- chaos_emergent 6y agoYeah, was going to comment something similar. For local testing I have some docker-compose files set up that create an ephemeral db that I can test against by migrating up to the current schema revision and then running tests. Saves time in pushing to the cloud and needing to wait for GitHub/Lab to build, pull and provision containers.
- OJFord 6y agoThat seems the same as any other method of using a postgres container? It'd look basically the same in GitLab, Circle, Travis, docker-compose, whatever.
- hn_throwaway_99 6y agoPoint is that GitHub has built-in support for including "service containers" in workflows that make it trivial to spin up services in different Docker containers, https://docs.github.com/en/actions/guides/about-service-containers https://docs.github.com/en/actions/guides/about-service-cont....
- OJFord 6y agoIt seems to me that my comment you're replying to applies equally well in response to this... I agree it's nice, painless, etc. I just wanted to be clear that it's not some novel ground-breaking GitHub feature, it's just a generic CI/CD SaaS feature. Not switch to/use GH Actions, but do this/have CI.