additionals/.travis.yml

41 lines
1.4 KiB
YAML
Raw Normal View History

2018-07-15 10:05:38 +03:00
language: ruby
2018-07-16 22:18:47 +03:00
2018-07-15 10:05:38 +03:00
rvm:
- 2.4.4
- 2.3.7
- 2.2.10
2018-07-15 10:05:38 +03:00
2018-07-16 22:18:47 +03:00
env:
- REDMINE_VER=3.4-stable DB=postgresql
- REDMINE_VER=master DB=postgresql
sudo: true
cache: bundler
2018-07-15 10:05:38 +03:00
addons:
postgresql: "9.6"
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
- 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
2018-07-15 10:05:38 +03:00
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
2018-07-16 22:18:47 +03:00
- bundle exec rake db:migrate
- bundle exec rake redmine:plugins:migrate
2018-07-15 10:05:38 +03:00
script:
2018-07-16 22:18:47 +03:00
- 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