summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-07-04 02:23:16 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-07-04 02:23:16 +0000
commit87c93a3c8505a24275f8b28d89061f8ee560a496 (patch)
tree8769250e3be6c60780cbdeaeeec212937cf15087 /lib
parent0982d5fc6c05e00dd31650c43286c70b6eb7badc (diff)
downloadredmine-87c93a3c8505a24275f8b28d89061f8ee560a496.tar.gz
redmine-87c93a3c8505a24275f8b28d89061f8ee560a496.zip
Merge .travis.yml related revisions from trunk to 2.4-stable
git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13212 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/ci.rake36
1 files changed, 28 insertions, 8 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index d30e9fb0a..41a334c5e 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -1,4 +1,4 @@
-desc "Run the Continous Integration tests for Redmine"
+desc "Run the Continuous Integration tests for Redmine"
task :ci do
# RAILS_ENV and ENV[] can diverge so force them both to test
ENV['RAILS_ENV'] = 'test'
@@ -16,13 +16,23 @@ namespace :ci do
Rake::Task["db:create:all"].invoke
Rake::Task["db:migrate"].invoke
Rake::Task["db:schema:dump"].invoke
- Rake::Task["test:scm:setup:all"].invoke
+ if scms = ENV['SCMS']
+ scms.split(',').each do |scm|
+ Rake::Task["test:scm:setup:#{scm}"].invoke
+ end
+ else
+ Rake::Task["test:scm:setup:all"].invoke
+ end
Rake::Task["test:scm:update"].invoke
end
desc "Build Redmine"
task :build do
- Rake::Task["test"].invoke
+ if test_suite = ENV['TEST_SUITE']
+ Rake::Task["test:#{test_suite}"].invoke
+ else
+ Rake::Task["test"].invoke
+ end
# Rake::Task["test:ui"].invoke if RUBY_VERSION >= '1.9.3'
end
@@ -43,14 +53,24 @@ file 'config/database.yml' do
case database
when 'mysql'
dev_conf = {'adapter' => (RUBY_VERSION >= '1.9' ? 'mysql2' : 'mysql'),
- 'database' => dev_db_name, 'host' => 'localhost',
- 'username' => 'jenkins', 'password' => 'jenkins',
- 'encoding' => 'utf8'}
+ 'database' => dev_db_name, 'host' => 'localhost',
+ 'encoding' => 'utf8'}
+ if ENV['RUN_ON_NOT_OFFICIAL']
+ dev_conf['username'] = 'root'
+ else
+ dev_conf['username'] = 'jenkins'
+ dev_conf['password'] = 'jenkins'
+ end
test_conf = dev_conf.merge('database' => test_db_name)
when 'postgresql'
dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
- 'host' => 'localhost',
- 'username' => 'jenkins', 'password' => 'jenkins'}
+ 'host' => 'localhost'}
+ if ENV['RUN_ON_NOT_OFFICIAL']
+ dev_conf['username'] = 'postgres'
+ else
+ dev_conf['username'] = 'jenkins'
+ dev_conf['password'] = 'jenkins'
+ end
test_conf = dev_conf.merge('database' => test_db_name)
when /sqlite3/
dev_conf = {'adapter' => (Object.const_defined?(:JRUBY_VERSION) ?