1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

CI against PostgreSQL 10

- Replace port number 5433 to 5432 (default value) which Active Record unit tests expect
- Restart PostgreSQL 10 service after changing port number
- PostgreSQL 10 is a addon for the current Travis CI. Installing
PostgreSQL 10 would cause longer CI to getting additional apt packages
Refer https://docs.travis-ci.com/user/database-setup/#PostgreSQL

- Use `sudo: required` for railties CI expecting PostgreSQL is up and running
This commit is contained in:
Yasuo Honda 2018-06-11 12:01:14 +00:00
parent e925cb4d85
commit 342e29bbbf

View file

@ -14,7 +14,7 @@ services:
- redis-server
addons:
postgresql: "9.6"
postgresql: 10
chrome: stable
apt:
sources:
@ -28,6 +28,8 @@ addons:
- poppler-utils
- mysql-server
- mysql-client
- postgresql-10
- postgresql-client-10
bundler_args: --without test --jobs 3 --retry 3
before_install:
@ -53,12 +55,10 @@ env:
global:
- "JRUBY_OPTS='--dev -J-Xmx1024M'"
matrix:
- "GEM=railties"
- "GEM=ap,ac"
- "GEM=am,amo,as,av,aj,ast"
- "GEM=as PRESERVE_TIMEZONES=1"
- "GEM=ar:sqlite3"
- "GEM=ar:postgresql"
- "GEM=guides"
- "GEM=ac:integration"
@ -69,6 +69,33 @@ rvm:
matrix:
include:
- rvm: 2.4.4
env: "GEM=railties"
sudo: required
before_install:
- "rm ${BUNDLE_GEMFILE}.lock"
- "travis_retry gem update --system"
- "travis_retry gem install bundler"
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: 2.5.1
env: "GEM=railties"
sudo: required
before_install:
- "rm ${BUNDLE_GEMFILE}.lock"
- "travis_retry gem update --system"
- "travis_retry gem install bundler"
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: ruby-head
env: "GEM=railties"
sudo: required
before_install:
- "rm ${BUNDLE_GEMFILE}.lock"
- "travis_retry gem update --system"
- "travis_retry gem install bundler"
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: 2.5.1
env: "GEM=av:ujs"
- rvm: 2.4.4
@ -118,6 +145,24 @@ matrix:
- rvm: 2.5.1
env:
- "GEM=ar:sqlite3_mem"
- rvm: 2.4.4
env: "GEM=ar:postgresql"
sudo: required
before_install:
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: 2.5.1
env: "GEM=ar:postgresql"
sudo: required
before_install:
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: ruby-head
env: "GEM=ar:postgresql"
sudo: required
before_install:
- "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
- "sudo service postgresql restart 10"
- rvm: 2.5.1
env:
- "GEM=ar:postgresql POSTGRES=9.2"