You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.travis.yml 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # Redmine runs tests on own continuous integration server.
  2. # http://www.redmine.org/projects/redmine/wiki/Continuous_integration
  3. # You can also run tests on your environment.
  4. language: ruby
  5. rvm:
  6. - 1.9.3
  7. - 2.0
  8. - 2.1
  9. - 2.2
  10. - jruby-9.0.1.0
  11. - jruby
  12. env:
  13. - "SUITE=units DB=postgresql"
  14. - "SUITE=functionals DB=postgresql"
  15. - "SUITE=integration DB=postgresql"
  16. - "SUITE=ui DB=postgresql"
  17. - "SUITE=units DB=postgresql-8.4"
  18. - "SUITE=functionals DB=postgresql-8.4"
  19. - "SUITE=integration DB=postgresql-8.4"
  20. - "SUITE=ui DB=postgresql-8.4"
  21. - "SUITE=units DB=postgresql-9.1"
  22. - "SUITE=functionals DB=postgresql-9.1"
  23. - "SUITE=integration DB=postgresql-9.1"
  24. - "SUITE=ui DB=postgresql-9.1"
  25. - "SUITE=units DB=postgresql-9.2"
  26. - "SUITE=functionals DB=postgresql-9.2"
  27. - "SUITE=integration DB=postgresql-9.2"
  28. - "SUITE=ui DB=postgresql-9.2"
  29. - "SUITE=units DB=postgresql-9.3"
  30. - "SUITE=functionals DB=postgresql-9.3"
  31. - "SUITE=integration DB=postgresql-9.3"
  32. - "SUITE=ui DB=postgresql-9.3"
  33. - "SUITE=units DB=postgresql-9.4"
  34. - "SUITE=functionals DB=postgresql-9.4"
  35. - "SUITE=integration DB=postgresql-9.4"
  36. - "SUITE=ui DB=postgresql-9.4"
  37. - "SUITE=units DB=postgresql-9.5"
  38. - "SUITE=functionals DB=postgresql-9.5"
  39. - "SUITE=integration DB=postgresql-9.5"
  40. - "SUITE=ui DB=postgresql-9.5"
  41. - "SUITE=units DB=mysql-5.5"
  42. - "SUITE=functionals DB=mysql-5.5"
  43. - "SUITE=integration DB=mysql-5.5"
  44. - "SUITE=ui DB=mysql-5.5"
  45. - "SUITE=units DB=mysql-5.6"
  46. - "SUITE=functionals DB=mysql-5.6"
  47. - "SUITE=integration DB=mysql-5.6"
  48. - "SUITE=ui DB=mysql-5.6"
  49. - "SUITE=units DB=mysql-5.7-dmr"
  50. - "SUITE=functionals DB=mysql-5.7-dmr"
  51. - "SUITE=integration DB=mysql-5.7-dmr"
  52. - "SUITE=ui DB=mysql-5.7-dmr"
  53. - "SUITE=units DB=mariadb-5.5"
  54. - "SUITE=functionals DB=mariadb-5.5"
  55. - "SUITE=integration DB=mariadb-5.5"
  56. - "SUITE=ui DB=mariadb-5.5"
  57. - "SUITE=units DB=mariadb-10.0"
  58. - "SUITE=functionals DB=mariadb-10.0"
  59. - "SUITE=integration DB=mariadb-10.0"
  60. - "SUITE=ui DB=mariadb-10.0"
  61. - "SUITE=units DB=sqlite3"
  62. - "SUITE=functionals DB=sqlite3"
  63. - "SUITE=integration DB=sqlite3"
  64. - "SUITE=ui DB=sqlite3"
  65. matrix:
  66. allow_failures:
  67. # http://www.redmine.org/issues/20251
  68. - env: "SUITE=ui DB=postgresql"
  69. - env: "SUITE=ui DB=mysql-5.5"
  70. - env: "SUITE=ui DB=mysql-5.6"
  71. - env: "SUITE=ui DB=mysql-5.7-dmr"
  72. - env: "SUITE=ui DB=mariadb-5.5"
  73. - env: "SUITE=ui DB=mariadb-10.0"
  74. - env: "SUITE=ui DB=sqlite3"
  75. - env: "SUITE=units DB=mysql-5.7-dmr"
  76. - env: "SUITE=functionals DB=mysql-5.7-dmr"
  77. - env: "SUITE=integration DB=mysql-5.7-dmr"
  78. - env: "SUITE=ui DB=postgresql-8.4"
  79. - env: "SUITE=ui DB=postgresql-9.1"
  80. - env: "SUITE=ui DB=postgresql-9.2"
  81. - env: "SUITE=ui DB=postgresql-9.3"
  82. - env: "SUITE=ui DB=postgresql-9.4"
  83. - env: "SUITE=ui DB=postgresql-9.5"
  84. - rvm: jruby-9.0.1.0
  85. # SCM tests fail randomly due to IO.popen().
  86. # http://www.redmine.org/issues/19091
  87. # https://github.com/jruby/jruby/issues/779
  88. - rvm: jruby
  89. # http://www.redmine.org/issues/17460
  90. # http://www.redmine.org/issues/19344
  91. - env: "SUITE=units DB=mysql-5.6"
  92. - env: "SUITE=units DB=mysql-5.7-dmr"
  93. - env: "SUITE=units DB=mariadb-5.5"
  94. - env: "SUITE=units DB=mariadb-10.0"
  95. before_install:
  96. # https://github.com/travis-ci/travis-ci/issues/4720
  97. - if [[ ${TRAVIS_RUBY_VERSION} =~ jruby-9\.0 ]] ;
  98. then
  99. rvm get master ;
  100. rvm use ${TRAVIS_RUBY_VERSION} --install ;
  101. ruby --version ;
  102. fi
  103. - "sudo apt-get update -qq"
  104. - "sudo apt-get --no-install-recommends install bzr cvs git mercurial subversion"
  105. - dpkg -l '*mysql*'
  106. - if [[ $DB =~ (mariadb|mysql-5\.[67]) ]] ;
  107. then
  108. sudo service mysql stop ;
  109. sudo apt-get install python-software-properties ;
  110. if [[ $DB =~ mariadb ]] ;
  111. then
  112. sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db ;
  113. MARIADB_VER=`echo $DB | sed -e 's/mariadb-//'` ;
  114. sudo add-apt-repository ''"deb http://ftp.osuosl.org/pub/mariadb/repo/${MARIADB_VER}/ubuntu precise main"'' ;
  115. sudo cp test/travis/mariadb.pref /etc/apt/preferences.d/mariadb.pref ;
  116. sudo apt-get update ;
  117. sudo DEBIAN_FRONTEND=noninteractive apt-get -q --yes --force-yes -f --option DPkg::Options::=--force-confnew install mariadb-server ;
  118. sudo apt-get install libmariadbd-dev ;
  119. else
  120. echo mysql-apt-config mysql-apt-config/enable-repo select $DB | sudo debconf-set-selections ;
  121. wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb ;
  122. sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb ;
  123. sudo apt-get update -q ;
  124. sudo apt-get install -q -y -o Dpkg::Options::=--force-confnew mysql-server ;
  125. fi
  126. elif [[ $DB =~ postgresql ]] ;
  127. then
  128. if [[ $DB =~ postgresql- ]] ;
  129. then
  130. PG_VER=`echo $DB | sed -e 's/postgresql-//'` ;
  131. sudo service postgresql stop ;
  132. sudo apt-get -y -qq --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common ;
  133. sudo rm -rf /var/lib/postgresql ;
  134. sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main ${PG_VER} >> /etc/apt/sources.list.d/pgdg.list" ;
  135. wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - ;
  136. sudo apt-get update -qq ;
  137. 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} ;
  138. echo "local all all trust" | sudo tee /etc/postgresql/${PG_VER}/main/pg_hba.conf ;
  139. echo "host all all 127.0.0.1/32 trust" | sudo tee -a /etc/postgresql/${PG_VER}/main/pg_hba.conf ;
  140. echo "host all all ::1/128 trust" | sudo tee -a /etc/postgresql/${PG_VER}/main/pg_hba.conf ;
  141. sudo service postgresql restart ;
  142. fi ;
  143. psql --version ;
  144. psql -c "SHOW SERVER_VERSION" -U postgres ;
  145. psql -c "SHOW SERVER_ENCODING" -U postgres ;
  146. psql -c "SHOW DateStyle" -U postgres ;
  147. fi
  148. - sudo sh -x test/travis/install-openldap.sh
  149. script:
  150. - export DATABASE_ADAPTER=${DB}
  151. - "SCMS=bazaar,cvs,subversion,git,mercurial,filesystem"
  152. - "export SCMS"
  153. - "git --version"
  154. - "bundle install"
  155. - "RUN_ON_NOT_OFFICIAL='' RUBY_VER=1.9 BRANCH=trunk bundle exec rake config/database.yml"
  156. - "bundle install"
  157. - "bundle exec rake ci:setup"
  158. - phantomjs --webdriver 4444 &
  159. - JRUBY_OPTS='-J-Xmx1024m -J-XX:MaxPermSize=1024m' bundle exec rake test:${SUITE}
  160. notifications:
  161. email: false