LoginSignup
1
1

More than 5 years have passed since last update.

CircleCIでPostgreSQL 9.3を使う

Last updated at Posted at 2016-04-05

CircleCIのPostgreSQLのデフォルトバージョンは9.4
バージョン9.3でテストしたいときは、circle.ymlに以下を追加する。9.4入れた後に9.3も入れている。

dependencies:
  pre:
    - sudo service postgresql stop && sudo apt-get remove -y
      postgresql-9.4 && sudo apt-get update; sudo apt-get install -y
      postgresql-9.3 postgresql-contrib-9.3
    - sudo sed -i "s/\port = 5433/port = 5432/"
      /etc/postgresql/9.3/main/postgresql.conf
    - sudo cp /etc/postgresql/9.4/main/pg_hba.conf
      /etc/postgresql/9.3/main/pg_hba.conf
    - sudo service postgresql restart
    - sudo -u postgres createuser ubuntu -d --superuser
    - createdb circle_test
    - createdb ubuntu

このタスクの実行時間は、40秒でした。

FAQにある、Dependencies内のHow do I use postgres 9.3?の情報を転載

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1