Travis CI configuration

This commit is contained in:
Karel Picman 2013-10-11 10:43:32 +02:00
parent e2bb12b929
commit a7d716da69
2 changed files with 34 additions and 37 deletions

View File

@ -1,9 +1,6 @@
language: ruby language: ruby
rvm: rvm:
- 1.8.7
- jruby-18mode
- 1.9.2
- 1.9.3 - 1.9.3
- 2.0.0 - 2.0.0
@ -16,7 +13,7 @@ script:
- export PATH_TO_REDMINE=$WORKSPACE/redmine - export PATH_TO_REDMINE=$WORKSPACE/redmine
- mkdir $WORKSPACE - mkdir $WORKSPACE
- cp config/database.yml.travis $WORKSPACE/database.yml - cp config/database.yml.travis $WORKSPACE/database.yml
- bash -x ./test/ci/redmine20_install.sh -r - bash -x ./test/ci/redmine_install.sh -r
- bash -x ./test/ci/redmine20_install.sh -i - bash -x ./test/ci/redmine_install.sh -i
- bash -x ./test/ci/redmine20_install.sh -t - bash -x ./test/ci/redmine_install.sh -t
- bash -x ./test/ci/redmine20_install.sh -u - bash -x ./test/ci/redmine_install.sh -u

View File

@ -61,49 +61,49 @@ uninstall()
cd $PATH_TO_REDMINE cd $PATH_TO_REDMINE
# clean up database # clean up database
bundle exec rake $MIGRATE_PLUGINS NAME=redmine_dmsf VERSION=0 RAILS_ENV=test bundle exec rake $MIGRATE_PLUGINS NAME=redmine_dmsf VERSION=0 RAILS_ENV=test
bundle exec rake $MIGRATE_PLUGINS NAME=redmine_dmsf VERSION=0 RAILS_ENV=development bundle exec rake $MIGRATE_PLUGINS NAME=redmine_dmsf VERSION=0 RAILS_ENV=development
} }
run_install() run_install()
{ {
# exit if install fails # exit if install fails
set -e set -e
# cd to redmine folder # cd to redmine folder
cd $PATH_TO_REDMINE cd $PATH_TO_REDMINE
echo current directory is `pwd` echo current directory is `pwd`
# create a link to the dmsf plugin # create a link to the dmsf plugin
ln -sf $PATH_TO_DMSF $PATH_TO_PLUGINS/redmine_dmsf ln -sf $PATH_TO_DMSF $PATH_TO_PLUGINS/redmine_dmsf
#ignore redmine-master's test-unit dependency, we need 1.2.3 #ignore redmine-master's test-unit dependency, we need 1.2.3
#sed -i -e 's=.*gem ["'\'']test-unit["'\''].*==g' ${PATH_TO_REDMINE}/Gemfile #sed -i -e 's=.*gem ["'\'']test-unit["'\''].*==g' ${PATH_TO_REDMINE}/Gemfile
# install gems # install gems
mkdir -p vendor/bundle mkdir -p vendor/bundle
# copy database.yml # copy database.yml
cp $WORKSPACE/database.yml config/ cp $WORKSPACE/database.yml config/
#Not ideal, but at present Travis-CI will not install with xapian enabled. #Not ideal, but at present Travis-CI will not install with xapian enabled.
#02-04-2013 bundle install needs to happen AFTER database configuration #02-04-2013 bundle install needs to happen AFTER database configuration
bundle install --path vendor/bundle --without xapian bundle install --path vendor/bundle --without xapian
# run redmine database migrations # run redmine database migrations
bundle exec rake db:migrate RAILS_ENV=test --trace bundle exec rake db:migrate RAILS_ENV=test --trace
bundle exec rake db:migrate RAILS_ENV=development --trace bundle exec rake db:migrate RAILS_ENV=development --trace
# install redmine database # install redmine database
bundle exec rake redmine:load_default_data REDMINE_LANG=en RAILS_ENV=development bundle exec rake redmine:load_default_data REDMINE_LANG=en RAILS_ENV=development
# generate session store/secret token # generate session store/secret token
bundle exec rake $GENERATE_SECRET bundle exec rake $GENERATE_SECRET
# enable development features # enable development features
touch dmsf.dev touch dmsf.dev
# run dmsf database migrations # run dmsf database migrations
bundle exec rake $MIGRATE_PLUGINS RAILS_ENV=test bundle exec rake $MIGRATE_PLUGINS RAILS_ENV=test
bundle exec rake $MIGRATE_PLUGINS RAILS_ENV=development bundle exec rake $MIGRATE_PLUGINS RAILS_ENV=development
} }
while getopts :irtu opt while getopts :irtu opt