##// END OF EJS Templates
add .travis.yml and switch database user/password by environments...
Toshi MARUYAMA -
r12390:1951aeac7897
parent child
Show More
@@ -0,0 +1,41
1 # Redmine runs tests on own continuous integration server.
2 # http://www.redmine.org/projects/redmine/wiki/Continuous_integration
3 # You can also run on tests on your environment.
4 language: ruby
5 rvm:
6 - 1.8.7
7 - 1.9.3
8 - 2.0.0
9 - 2.1.0
10 - jruby-18mode
11 - jruby-19mode
12 env:
13 - "TEST_SUITE=units DATABASE_ADAPTER=postgresql"
14 - "TEST_SUITE=functionals DATABASE_ADAPTER=postgresql"
15 - "TEST_SUITE=integration DATABASE_ADAPTER=postgresql"
16 - "TEST_SUITE=units DATABASE_ADAPTER=mysql"
17 - "TEST_SUITE=functionals DATABASE_ADAPTER=mysql"
18 - "TEST_SUITE=integration DATABASE_ADAPTER=mysql"
19 - "TEST_SUITE=units DATABASE_ADAPTER=sqlite3"
20 - "TEST_SUITE=functionals DATABASE_ADAPTER=sqlite3"
21 - "TEST_SUITE=integration DATABASE_ADAPTER=sqlite3"
22 matrix:
23 allow_failures:
24 - rvm: jruby-19mode
25 env: "TEST_SUITE=units DATABASE_ADAPTER=postgresql"
26 - rvm: jruby-19mode
27 env: "TEST_SUITE=functionals DATABASE_ADAPTER=postgresql"
28 - rvm: jruby-19mode
29 env: "TEST_SUITE=integration DATABASE_ADAPTER=postgresql"
30 before_install:
31 - "sudo apt-get update -qq"
32 - "sudo apt-get --no-install-recommends install bzr cvs git mercurial subversion"
33 script:
34 - "SCMS=bazaar,cvs,subversion,git,mercurial,filesystem"
35 - "export SCMS"
36 - "bundle install"
37 - "RUN_ON_NOT_OFFICIAL='' RUBY_VER=1.9 BRANCH=trunk bundle exec rake config/database.yml"
38 - "bundle install"
39 - "JRUBY_OPTS=-J-Xmx1024m bundle exec rake ci"
40 notifications:
41 email: false
@@ -54,13 +54,23 file 'config/database.yml' do
54 when 'mysql'
54 when 'mysql'
55 dev_conf = {'adapter' => (RUBY_VERSION >= '1.9' ? 'mysql2' : 'mysql'),
55 dev_conf = {'adapter' => (RUBY_VERSION >= '1.9' ? 'mysql2' : 'mysql'),
56 'database' => dev_db_name, 'host' => 'localhost',
56 'database' => dev_db_name, 'host' => 'localhost',
57 'username' => 'jenkins', 'password' => 'jenkins',
58 'encoding' => 'utf8'}
57 'encoding' => 'utf8'}
58 if ENV['RUN_ON_NOT_OFFICIAL']
59 dev_conf['username'] = 'root'
60 else
61 dev_conf['username'] = 'jenkins'
62 dev_conf['password'] = 'jenkins'
63 end
59 test_conf = dev_conf.merge('database' => test_db_name)
64 test_conf = dev_conf.merge('database' => test_db_name)
60 when 'postgresql'
65 when 'postgresql'
61 dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
66 dev_conf = {'adapter' => 'postgresql', 'database' => dev_db_name,
62 'host' => 'localhost',
67 'host' => 'localhost'}
63 'username' => 'jenkins', 'password' => 'jenkins'}
68 if ENV['RUN_ON_NOT_OFFICIAL']
69 dev_conf['username'] = 'postgres'
70 else
71 dev_conf['username'] = 'jenkins'
72 dev_conf['password'] = 'jenkins'
73 end
64 test_conf = dev_conf.merge('database' => test_db_name)
74 test_conf = dev_conf.merge('database' => test_db_name)
65 when /sqlite3/
75 when /sqlite3/
66 dev_conf = {'adapter' => (Object.const_defined?(:JRUBY_VERSION) ?
76 dev_conf = {'adapter' => (Object.const_defined?(:JRUBY_VERSION) ?
General Comments 0
You need to be logged in to leave comments. Login now