Skip to content

Commit a2c7a9c

Browse files
committed
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.
1 parent e4cb33e commit a2c7a9c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: rust
22
sudo: required
3-
dist: trusty
3+
dist: xenial
44

55
# Ignore this branch per bors-ng documentation
66
branches:
@@ -24,8 +24,11 @@ env:
2424
# on community-submitted PRs
2525
- PERCY_TOKEN=0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
2626
- PERCY_PROJECT=crates-io/crates.io
27+
- PGPORT=5433
2728

2829
install:
30+
- sudo cp /etc/postgresql/10/main/pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
31+
- sudo systemctl restart postgresql@11-main
2932
- script/ci/cargo-clean-on-new-rustc-version.sh
3033
- cargo install --force diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres && export PATH=$HOME/.cargo/bin:$PATH
3134

@@ -34,7 +37,11 @@ before_script:
3437

3538
addons:
3639
chrome: stable
37-
postgresql: "9.5"
40+
postgresql: "11"
41+
apt:
42+
packages:
43+
- postgresql-11
44+
- postgresql-client-11
3845

3946
matrix:
4047
fast_finish: true

0 commit comments

Comments
 (0)