From a2c7a9c6ebe44bc36d27e165d9a261b2626f2d31 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 21 Mar 2019 14:55:44 -0600 Subject: [PATCH] Change Travis to PG 11 We're running PG 11 in production now, so we should test against the same version in CI. I had to put us on the newer xenial image to get this to work, since trusty leaves 9.2 running if it doesn't recognize the newer version you're trying to run, which caused issues. There's no built-in cookbook for 11 yet, so I've had to install it from apt and copy some additional minimal configuration to get things to work. --- .travis.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f6e067e1b4..8b39928ca2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust sudo: required -dist: trusty +dist: xenial # Ignore this branch per bors-ng documentation branches: @@ -24,8 +24,11 @@ env: # on community-submitted PRs - PERCY_TOKEN=0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1 - PERCY_PROJECT=crates-io/crates.io + - PGPORT=5433 install: + - sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf + - sudo systemctl restart postgresql@11-main - script/ci/cargo-clean-on-new-rustc-version.sh - cargo install --force diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres && export PATH=$HOME/.cargo/bin:$PATH @@ -34,7 +37,11 @@ before_script: addons: chrome: stable - postgresql: "9.5" + postgresql: "11" + apt: + packages: + - postgresql-11 + - postgresql-client-11 matrix: fast_finish: true