2018-07-15 10:05:38 +03:00
language : ruby
2020-03-03 17:51:45 +03:00
os : linux
2019-07-23 14:33:30 +03:00
dist : xenial
2018-07-16 22:18:47 +03:00
2018-07-15 10:05:38 +03:00
rvm :
2019-11-07 11:53:28 +03:00
- 2.6 .5
- 2.4 .9
2018-11-26 08:19:24 +03:00
- 2.3 .8
2019-01-03 15:14:05 +03:00
2019-07-23 14:33:30 +03:00
services :
- mysql
- postgresql
2018-07-16 22:18:47 +03:00
env :
2018-12-29 20:39:10 +03:00
- REDMINE_VER=4.0-stable DB=postgresql
2019-12-22 09:40:27 +03:00
- REDMINE_VER=master DB=postgresql
2019-01-03 15:55:47 +03:00
- REDMINE_VER=4.0-stable DB=mysql
2019-12-22 09:40:27 +03:00
- REDMINE_VER=master DB=mysql
2018-07-16 22:18:47 +03:00
before_install :
- export PLUGIN_NAME=additionals
- export REDMINE_GIT_REPO=git://github.com/redmine/redmine.git
- export REDMINE_PATH=$HOME/redmine
- export BUNDLE_GEMFILE=$REDMINE_PATH/Gemfile
2019-03-13 09:57:50 +03:00
- export RAILS_ENV=test
2018-07-16 22:18:47 +03:00
- git clone $REDMINE_GIT_REPO $REDMINE_PATH
- cd $REDMINE_PATH
- if [[ "$REDMINE_VER" != "master" ]]; then git checkout -b $REDMINE_VER origin/$REDMINE_VER; fi
2019-12-25 10:45:16 +03:00
- if [[ "$REDMINE_VER" != "master" ]]; then cp $TRAVIS_BUILD_DIR/test/support/Gemfile.local $REDMINE_PATH; fi
2018-07-16 22:18:47 +03:00
- ln -s $TRAVIS_BUILD_DIR $REDMINE_PATH/plugins/$PLUGIN_NAME
- cp $TRAVIS_BUILD_DIR/test/support/additional_environment.rb $REDMINE_PATH/config/
- cp $TRAVIS_BUILD_DIR/test/support/database-$DB-travis.yml $REDMINE_PATH/config/database.yml
2018-07-15 10:05:38 +03:00
before_script :
2019-03-13 09:15:02 +03:00
- bundle exec rake db:create db:migrate redmine:plugins:migrate
2018-07-15 10:05:38 +03:00
script :
2019-12-25 11:44:43 +03:00
- if [[ "$REDMINE_VER" == "master" ]] && [[ "$DB" == "postgresql" ]]; then brakeman plugins/$PLUGIN_NAME; fi
- if [[ "$REDMINE_VER" != "master" ]] && [[ "$DB" == "postgresql" ]]; then rubocop plugins/$PLUGIN_NAME; fi
2019-12-22 09:40:27 +03:00
- bundle exec rake redmine:plugins:test NAME=$PLUGIN_NAME RUBYOPT="-W0"
2020-01-01 20:50:42 +03:00
- bundle exec rake redmine:plugins:migrate NAME=$PLUGIN_NAME VERSION=0