annikoff/redmine_plugin_computed_custom_field

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: trusty
language: ruby

rvm: 2.1.5

env:
  - REDMINE_VER=3.4.7
  - REDMINE_VER=3.3.9
  - REDMINE_VER=3.2.9
  - REDMINE_VER=3.1.7
  - REDMINE_VER=3.0.7
  - REDMINE_VER=2.6.10

addons:
  chrome: stable

matrix:
  include:
  - rvm: 1.9.3
    env: REDMINE_VER=2.5.3
  - rvm: 2.2.3
    env: REDMINE_VER=4.0.0

before_install:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - if [[ $REDMINE_VER = '4.0.0' ]]; then
      wget -N http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip -P ~/;
      unzip ~/chromedriver_linux64.zip -d ~/;
      rm ~/chromedriver_linux64.zip;
      sudo mv -f ~/chromedriver /usr/local/share/;
      sudo chmod +x /usr/local/share/chromedriver;
      sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver;
      google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
    else
      phantomjs --webdriver 4444 &
    fi
  - export RUBYOPT="-W0"
  - export PLUGIN_NAME=computed_custom_field
  - export REDMINE_PATH=$HOME/redmine
  - git clone -b "$REDMINE_VER" --single-branch https://github.com/redmine/redmine.git $REDMINE_PATH
  - ln -s $TRAVIS_BUILD_DIR $REDMINE_PATH/plugins/$PLUGIN_NAME
  - cp config/database.yml.travis $REDMINE_PATH/config/database.yml
  - cp test/gemfile_locks/$REDMINE_VER/Gemfile.lock $REDMINE_PATH/Gemfile.lock
  - cd $REDMINE_PATH
  - if [[ $REDMINE_VER < '3.2.9' ]]; then
    echo "$(curl http://www.redmine.org/projects/redmine/repository/revisions/14891/diff/trunk/lib/tasks/redmine.rake?format=diff)" > redmine.rake.patch;
    patch lib/tasks/redmine.rake redmine.rake.patch; fi
  - bundle install --without development

install: true

before_script:
  - bundle exec rake db:create
  - bundle exec rake db:migrate
  - bundle exec rake redmine:plugins:migrate

script:
  - bundle exec rake redmine:plugins:test:units NAME=$PLUGIN_NAME
  - bundle exec rake redmine:plugins:test:ui NAME=$PLUGIN_NAME

notifications:
  email: false