|
|
# Redmine runs tests on own continuous integration server.
|
|
|
# http://www.redmine.org/projects/redmine/wiki/Continuous_integration
|
|
|
# You can also run tests on your environment.
|
|
|
language: ruby
|
|
|
rvm:
|
|
|
- 1.8.7
|
|
|
- 1.9.2
|
|
|
- 1.9.3
|
|
|
- 2.0
|
|
|
- 2.1
|
|
|
- 2.2
|
|
|
- jruby-9.0.1.0
|
|
|
- jruby
|
|
|
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"
|
|
|
- "SUITE=units DB=sqlite3"
|
|
|
- "SUITE=functionals DB=sqlite3"
|
|
|
- "SUITE=integration DB=sqlite3"
|
|
|
matrix:
|
|
|
allow_failures:
|
|
|
# SCM tests fail randomly due to IO.popen().
|
|
|
# http://www.redmine.org/issues/19091
|
|
|
# https://github.com/jruby/jruby/issues/779
|
|
|
- rvm: jruby
|
|
|
- rvm: jruby-9.0.1.0
|
|
|
env: "SUITE=units DB=postgresql-9.5"
|
|
|
- rvm: jruby-9.0.1.0
|
|
|
env: "SUITE=functionals DB=postgresql-9.5"
|
|
|
- rvm: jruby-9.0.1.0
|
|
|
env: "SUITE=integration DB=postgresql-9.5"
|
|
|
before_install:
|
|
|
# https://github.com/travis-ci/travis-ci/issues/4720
|
|
|
- if [[ ${TRAVIS_RUBY_VERSION} =~ jruby-9\.0 ]] ;
|
|
|
then
|
|
|
rvm get master ;
|
|
|
rvm use ${TRAVIS_RUBY_VERSION} --install ;
|
|
|
ruby --version ;
|
|
|
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"
|
|
|
- "export SCMS"
|
|
|
- "git --version"
|
|
|
- "bundle install"
|
|
|
- "RUN_ON_NOT_OFFICIAL='' RUBY_VER=1.9 BRANCH=trunk bundle exec rake config/database.yml"
|
|
|
- "bundle install"
|
|
|
- export TEST_SUITE=${SUITE}
|
|
|
- JRUBY_OPTS='-J-Xmx1024m -J-XX:MaxPermSize=1024m' bundle exec rake ci
|
|
|
notifications:
|
|
|
email: false
|
|
|
|