diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2015-08-30 05:16:02 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2015-08-30 05:16:02 +0000 |
commit | fb49c28d1cab970b1e107b81cdd9017352f04a26 (patch) | |
tree | 0be837811f86aee2aa76990d939a018ac544e603 | |
parent | 5168b5e86e381c123a1a48fadb6d9567f2bfbbf0 (diff) | |
download | redmine-fb49c28d1cab970b1e107b81cdd9017352f04a26.tar.gz redmine-fb49c28d1cab970b1e107b81cdd9017352f04a26.zip |
Merged r14416 and r14530 from trunk to 2.6-stable
travis: add PostgreSQL environments
git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@14532 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .travis.yml | 40 | ||||
-rw-r--r-- | lib/tasks/ci.rake | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index b3935b36c..90ed201ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,24 @@ env: - "SUITE=units DB=postgresql" - "SUITE=functionals DB=postgresql" - "SUITE=integration DB=postgresql" + - "SUITE=units DB=postgresql-8.4" + - "SUITE=functionals DB=postgresql-8.4" + - "SUITE=integration DB=postgresql-8.4" + - "SUITE=units DB=postgresql-9.1" + - "SUITE=functionals DB=postgresql-9.1" + - "SUITE=integration DB=postgresql-9.1" + - "SUITE=units DB=postgresql-9.2" + - "SUITE=functionals DB=postgresql-9.2" + - "SUITE=integration DB=postgresql-9.2" + - "SUITE=units DB=postgresql-9.3" + - "SUITE=functionals DB=postgresql-9.3" + - "SUITE=integration DB=postgresql-9.3" + - "SUITE=units DB=postgresql-9.4" + - "SUITE=functionals DB=postgresql-9.4" + - "SUITE=integration DB=postgresql-9.4" + - "SUITE=units DB=postgresql-9.5" + - "SUITE=functionals DB=postgresql-9.5" + - "SUITE=integration DB=postgresql-9.5" - "SUITE=units DB=mysql" - "SUITE=functionals DB=mysql" - "SUITE=integration DB=mysql" @@ -37,6 +55,28 @@ before_install: fi - "sudo apt-get update -qq" - "sudo apt-get --no-install-recommends install bzr cvs git mercurial subversion" + - if [[ $DB =~ postgresql ]] ; + then + if [[ $DB =~ postgresql- ]] ; + then + PG_VER=`echo $DB | sed -e 's/postgresql-//'` ; + sudo service postgresql stop ; + sudo apt-get -y -qq --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common ; + sudo rm -rf /var/lib/postgresql ; + sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main ${PG_VER} >> /etc/apt/sources.list.d/pgdg.list" ; + wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - ; + sudo apt-get update -qq ; + sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-${PG_VER} postgresql-contrib-${PG_VER} postgresql-server-dev-${PG_VER} ; + echo "local all all trust" | sudo tee /etc/postgresql/${PG_VER}/main/pg_hba.conf ; + echo "host all all 127.0.0.1/32 trust" | sudo tee -a /etc/postgresql/${PG_VER}/main/pg_hba.conf ; + echo "host all all ::1/128 trust" | sudo tee -a /etc/postgresql/${PG_VER}/main/pg_hba.conf ; + sudo service postgresql restart ; + fi ; + psql --version ; + psql -c "SHOW SERVER_VERSION" -U postgres ; + psql -c "SHOW SERVER_ENCODING" -U postgres ; + psql -c "SHOW DateStyle" -U postgres ; + fi script: - export DATABASE_ADAPTER=${DB} - "SCMS=bazaar,cvs,subversion,git,mercurial,filesystem" diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 41a334c5e..3441bc67a 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -62,7 +62,7 @@ file 'config/database.yml' do dev_conf['password'] = 'jenkins' end test_conf = dev_conf.merge('database' => test_db_name) - when 'postgresql' + when /postgresql/ dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name, 'host' => 'localhost'} if ENV['RUN_ON_NOT_OFFICIAL'] |