diff --git a/.travis-postgres10.sh b/.travis-postgres10.sh deleted file mode 100755 index bca31aa..0000000 --- a/.travis-postgres10.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# -# Installs PostgreSQL 10 on Travis CI, as the default build images don't support it yet. -# -# @see https://github.com/travis-ci/travis-ci/issues/8537#issuecomment-354020356 - -set -euxo pipefail - -echo "Installing Postgres 10..." -sudo service postgresql stop -sudo apt-get remove --quiet 'postgresql-*' -sudo apt-get update --quiet -sudo apt-get install --quiet postgresql-10 postgresql-client-10 -sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf - -echo "Restarting Postgres 10..." -sudo service postgresql restart - -echo "Adding Travis role..." -sudo psql --command="CREATE ROLE travis SUPERUSER LOGIN CREATEDB;" --username="postgres" diff --git a/.travis.yml b/.travis.yml index e96d681..4b04d29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,11 @@ services: # @see https://github.com/travis-ci/travis-ci/issues/8537#issuecomment-354020356 sudo: required addons: - postgresql: 9.6 + postgresql: "10" + apt: + packages: + - postgresql-10 + - postgresql-client-10 cache: yarn: true @@ -29,9 +33,6 @@ before_install: - curl --location https://yarnpkg.com/install.sh | bash -s -- --version "$( node -e "console.log(require('./package.json').engines.yarn)" )" - export PATH="$HOME/.yarn/bin:$PATH" - # Upgrade to PostgreSQL 10. - - ./.travis-postgres10.sh - install: - yarn --frozen-lockfile