From acee238f49f2e7dce9496a8a1859dedaeeeb6709 Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Wed, 28 Jul 2021 13:54:13 -0400 Subject: [PATCH] Change Travis to use Focal Fossa and Postgresql 12 (#14368) --- .travis.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 43f294d40..c9b076db9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: focal branches: only: - main @@ -9,7 +10,11 @@ cache: rvm: - 2.7.2 addons: - postgresql: '10' # Travis does not work out of the box with Postgres 11 yet + postgresql: '12' + apt: + packages: + - postgresql-12 + - postgresql-client-12 chrome: 'stable' artifacts: paths: @@ -21,9 +26,9 @@ addons: env: global: - RAILS_ENV=test - - DATABASE_URL=postgres://postgres@localhost/Forem_prod_test + - DATABASE_URL=postgres://travis@localhost:5433/Forem_prod_test - DATABASE_NAME=Forem_prod_test - - DATABASE_URL_TEST=postgres://postgres@localhost/Forem_test + - DATABASE_URL_TEST=postgres://travis@localhost:5433/Forem_test - DATABASE_NAME_TEST=Forem_test # Dummy values needed to verify the app boots via "rails runner" - APP_PROTOCOL=http:// @@ -38,6 +43,12 @@ env: - COVERAGE_REPORTS_TOTAL=4 - FOREM_OWNER_SECRET="secret" # test secret so e2e tests can run properly. before_install: + - >- + sudo sed -i + -e '/local.*peer/s/postgres/all/' + -e 's/peer\|md5/trust/g' + /etc/postgresql/12/main/pg_hba.conf + - sudo service postgresql@12-main restart - gem install bundler:"<2.3" install: - date --rfc-3339=seconds