additionals/.travis.yml
2019-11-07 09:55:39 +01:00

52 lines
1.6 KiB
YAML

language: ruby
dist: xenial
rvm:
- 2.6.5
- 2.4.9
- 2.3.8
services:
- mysql
- postgresql
env:
- REDMINE_VER=4.0-stable DB=postgresql
- REDMINE_VER=3.4-stable DB=postgresql
- REDMINE_VER=4.0-stable DB=mysql
- REDMINE_VER=3.4-stable DB=mysql
sudo: true
bundler_args: --without development
matrix:
exclude:
- rvm: 2.6.5
env: REDMINE_VER=3.4-stable DB=mysql
- rvm: 2.6.5
env: REDMINE_VER=3.4-stable DB=postgresql
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
- export RAILS_ENV=test
- git clone $REDMINE_GIT_REPO $REDMINE_PATH
- cd $REDMINE_PATH
- if [[ "$REDMINE_VER" != "master" ]]; then git checkout -b $REDMINE_VER origin/$REDMINE_VER; fi
- 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
before_script:
- bundle exec rake db:create db:migrate redmine:plugins:migrate
script:
- export SKIP_COVERAGE=1
- if [[ "$REDMINE_VER" == "master" ]]; then bundle exec rake redmine:plugins:test:units NAME=$PLUGIN_NAME; fi
- if [[ "$REDMINE_VER" == "master" ]]; then bundle exec rake redmine:plugins:test:functionals NAME=$PLUGIN_NAME; fi
- if [[ "$REDMINE_VER" == "master" ]]; then bundle exec rake redmine:plugins:test:integration NAME=$PLUGIN_NAME; fi
- if [[ "$REDMINE_VER" != "master" ]]; then bundle exec rake redmine:plugins:test NAME=$PLUGIN_NAME RUBYOPT="-W0"; fi