additionals/.travis.yml

44 lines
1.5 KiB
YAML
Raw Normal View History

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:
2020-04-04 16:47:00 +03:00
- 2.6.6
- 2.5.8
2020-04-04 16:47:00 +03:00
- 2.4.10
2019-07-23 14:33:30 +03:00
services:
- mysql
- postgresql
2018-07-16 22:18:47 +03:00
env:
2020-07-27 11:55:56 +03:00
- REDMINE_VER=4.1-stable DB=postgresql
2019-12-22 09:40:27 +03:00
- REDMINE_VER=master DB=postgresql
2020-07-27 11:55:56 +03:00
- REDMINE_VER=4.1-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
2020-07-27 12:33:11 +03:00
- sed -i '/rubocop/d' $REDMINE_PATH/Gemfile
- rm -f $REDMINE_PATH/.rubocop*
- cp $TRAVIS_BUILD_DIR/test/support/Gemfile.local $REDMINE_PATH
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:
- 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