mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
travis: add PostgreSQL environments
git-svn-id: http://svn.redmine.org/redmine/trunk@14530 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
45
.travis.yml
45
.travis.yml
@@ -14,6 +14,30 @@ env:
|
|||||||
- "SUITE=functionals DB=postgresql"
|
- "SUITE=functionals DB=postgresql"
|
||||||
- "SUITE=integration DB=postgresql"
|
- "SUITE=integration DB=postgresql"
|
||||||
- "SUITE=ui DB=postgresql"
|
- "SUITE=ui DB=postgresql"
|
||||||
|
- "SUITE=units DB=postgresql-8.4"
|
||||||
|
- "SUITE=functionals DB=postgresql-8.4"
|
||||||
|
- "SUITE=integration DB=postgresql-8.4"
|
||||||
|
- "SUITE=ui DB=postgresql-8.4"
|
||||||
|
- "SUITE=units DB=postgresql-9.1"
|
||||||
|
- "SUITE=functionals DB=postgresql-9.1"
|
||||||
|
- "SUITE=integration DB=postgresql-9.1"
|
||||||
|
- "SUITE=ui DB=postgresql-9.1"
|
||||||
|
- "SUITE=units DB=postgresql-9.2"
|
||||||
|
- "SUITE=functionals DB=postgresql-9.2"
|
||||||
|
- "SUITE=integration DB=postgresql-9.2"
|
||||||
|
- "SUITE=ui DB=postgresql-9.2"
|
||||||
|
- "SUITE=units DB=postgresql-9.3"
|
||||||
|
- "SUITE=functionals DB=postgresql-9.3"
|
||||||
|
- "SUITE=integration DB=postgresql-9.3"
|
||||||
|
- "SUITE=ui DB=postgresql-9.3"
|
||||||
|
- "SUITE=units DB=postgresql-9.4"
|
||||||
|
- "SUITE=functionals DB=postgresql-9.4"
|
||||||
|
- "SUITE=integration DB=postgresql-9.4"
|
||||||
|
- "SUITE=ui DB=postgresql-9.4"
|
||||||
|
- "SUITE=units DB=postgresql-9.5"
|
||||||
|
- "SUITE=functionals DB=postgresql-9.5"
|
||||||
|
- "SUITE=integration DB=postgresql-9.5"
|
||||||
|
- "SUITE=ui DB=postgresql-9.5"
|
||||||
- "SUITE=units DB=mysql-5.5"
|
- "SUITE=units DB=mysql-5.5"
|
||||||
- "SUITE=functionals DB=mysql-5.5"
|
- "SUITE=functionals DB=mysql-5.5"
|
||||||
- "SUITE=integration DB=mysql-5.5"
|
- "SUITE=integration DB=mysql-5.5"
|
||||||
@@ -51,6 +75,12 @@ matrix:
|
|||||||
- env: "SUITE=units DB=mysql-5.7-dmr"
|
- env: "SUITE=units DB=mysql-5.7-dmr"
|
||||||
- env: "SUITE=functionals DB=mysql-5.7-dmr"
|
- env: "SUITE=functionals DB=mysql-5.7-dmr"
|
||||||
- env: "SUITE=integration DB=mysql-5.7-dmr"
|
- env: "SUITE=integration DB=mysql-5.7-dmr"
|
||||||
|
- env: "SUITE=ui DB=postgresql-8.4"
|
||||||
|
- env: "SUITE=ui DB=postgresql-9.1"
|
||||||
|
- env: "SUITE=ui DB=postgresql-9.2"
|
||||||
|
- env: "SUITE=ui DB=postgresql-9.3"
|
||||||
|
- env: "SUITE=ui DB=postgresql-9.4"
|
||||||
|
- env: "SUITE=ui DB=postgresql-9.5"
|
||||||
- rvm: jruby-9.0.0.0
|
- rvm: jruby-9.0.0.0
|
||||||
# SCM tests fail randomly due to IO.popen().
|
# SCM tests fail randomly due to IO.popen().
|
||||||
# http://www.redmine.org/issues/19091
|
# http://www.redmine.org/issues/19091
|
||||||
@@ -95,6 +125,21 @@ before_install:
|
|||||||
fi
|
fi
|
||||||
elif [[ $DB =~ postgresql ]] ;
|
elif [[ $DB =~ postgresql ]] ;
|
||||||
then
|
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 --version ;
|
||||||
psql -c "SHOW SERVER_VERSION" -U postgres ;
|
psql -c "SHOW SERVER_VERSION" -U postgres ;
|
||||||
psql -c "SHOW SERVER_ENCODING" -U postgres ;
|
psql -c "SHOW SERVER_ENCODING" -U postgres ;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ file 'config/database.yml' do
|
|||||||
dev_conf['password'] = 'jenkins'
|
dev_conf['password'] = 'jenkins'
|
||||||
end
|
end
|
||||||
test_conf = dev_conf.merge('database' => test_db_name)
|
test_conf = dev_conf.merge('database' => test_db_name)
|
||||||
when 'postgresql'
|
when /postgresql/
|
||||||
dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
|
dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
|
||||||
'host' => 'localhost'}
|
'host' => 'localhost'}
|
||||||
if ENV['RUN_ON_NOT_OFFICIAL']
|
if ENV['RUN_ON_NOT_OFFICIAL']
|
||||||
|
|||||||
Reference in New Issue
Block a user