Closed adrianna-chang-shopify closed 3 years ago
without needing to create a separate service container
Honestly that would have been fine to use an external container, and probably more resilient to changes, as ubuntu-latest
is a moving target, so future ubuntu upgrades might break our CI.
But looks fine for now so I'll merge.
Move CI build from Travis to GitHub actions
I've changed the ruby versions to test 2.6 and 2.7 now that the main branch for Rails requires ruby-2.7 to work.
Étienne and I wrestled with trying to get PostgresQL working properly, without needing to create a separate service container (since it comes out of the box with the Ubuntu VM). We were constantly running into the error
FATAL: Peer authentication failed for user "postgres"
though.psql
doesn't allow you to specify a password through the CLI, and even exporting it as an env var (PGPASSWORD=postgres
) wouldn't work.We found this action figured out how to start psql in the VM. Notably, it specifies swaps using
md5
auth fortrust
, and then creates a superuser and a new db that we can connect to from the tests. I've borrowed the steps from this action and added them to a single step in our workflow so that we don't have this external dependency.