TravisCI -> GH Actions
Closes #646
- [ ] Make tests pass
- [ ] Enable code coverage report
NOTE Will squash at the end
@sauloperez Did you see any similar error in the past? I basically copy-pasted from OFN, but apparently Rails can't connect to postgresql... I'm exposing the service at that port 🤔

We can try with some more --health-retries and see if that makes any difference :shrug:
@sauloperez changing those 2 things (ENV var naming and the --health-retries), we got a different error 🤷
Error: Failed to initialize, postgres service is unhealthy.
Oops, no. You are right, those ENV vars are defined by the PostgreSQL image. Nothing to do with the config/database.yml ones. And at OFN we just match the default values defined in config/database.yml without needing any extra vars.
UPDATE I returned back to check an extra ENV var (I'd like to avoid infra changes/coordination) and tried a couple of tweaks more (more retries and newer PostgreSQL versions), but still no luck :(
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
UPDATE After some random back and forth, I made some progress. Now the PostgreSQL service seems to start well, but it still fails due to:
rails aborted!
ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: operator does not exist: hstore @> jsonb
LINE 1: ... one FROM "categories" WHERE ("name_translations" @> '{"es":...
@sauloperez do you have any idea about this one?
yes, that is using the hstore postgreSQL extension but it doesn't seem to be installed in CI. See: https://github.com/coopdevs/timeoverflow-provisioning/blob/c8f0d859d27b5d7f41e7f370dd6d39e36f650e95/roles/database/tasks/main.yml#L56-L61.
UPDATE I tried forcing the hstore installation (https://github.com/coopdevs/timeoverflow/commit/7d11937025b199b0f2a3429db430281291d942b5), but no luck :(
Anyway, I think this shouldn't be necessary 🤔 since we are loading the structure.sql file, which includes this line:
https://github.com/coopdevs/timeoverflow/blob/85dd90f689ce8831dff645d14f03a60a67181e4f/db/structure.sql#L28
@sauloperez Do you think we need something else to get the hstore extension working? Any clue 💡?
Yay! 🎉 Build is green now! Never give up 💪🏼
@franpb14 What do you think? Could you please review it and test it locally 🙏🏼? The most "critical" thing is the migration.