Restream/redmine_elasticsearch

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: ruby

services:
  - postgresql
  - redis-server
  - elasticsearch

rvm:
  - 2.3.1

gemfile:
  - $REDMINE_PATH/Gemfile

env:
  - REDMINE_VER=3.3.1 DB=postgresql

sudo: true
addons:
  apt:
    packages:
      - oracle-java8-set-default

before_install:
  - sudo service elasticsearch stop
  - export ES_HOME=/usr/share/elasticsearch
  - curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
  - sudo dpkg -i --force-confnew elasticsearch-5.5.0.deb
  - sudo $ES_HOME/bin/elasticsearch-plugin install http://dl.bintray.com/content/imotov/elasticsearch-plugins/org/elasticsearch/elasticsearch-analysis-morphology/5.5.0/elasticsearch-analysis-morphology-5.5.0.zip
  - yes | sudo $ES_HOME/bin/elasticsearch-plugin install ingest-attachment
  - sudo service elasticsearch start
  - sleep 5
  - export PLUGIN_NAME=redmine_elasticsearch
  - export REDMINE_PATH=$HOME/redmine
  - svn co http://svn.redmine.org/redmine/tags/$REDMINE_VER $REDMINE_PATH
  - ln -s $TRAVIS_BUILD_DIR $REDMINE_PATH/plugins/$PLUGIN_NAME
  - cp config/database-$DB-travis.yml $REDMINE_PATH/config/database.yml
  - git clone --depth=1 https://github.com/Restream/redmine_resque.git $REDMINE_PATH/plugins/redmine_resque
  - cd $REDMINE_PATH

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 NAME=$PLUGIN_NAME RUBYOPT="-W0"