Add travis configuration
This commit is contained in:
44
.travis.yml
Normal file
44
.travis.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
language: ruby
|
||||
|
||||
rvm:
|
||||
- 2.4.1
|
||||
- 2.3.4
|
||||
- 2.2.7
|
||||
|
||||
gemfile:
|
||||
- $REDMINE_PATH/Gemfile
|
||||
|
||||
env:
|
||||
- REDMINE_VER=3.4-stable DB=postgresql
|
||||
# - REDMINE_VER=master
|
||||
|
||||
sudo: true
|
||||
|
||||
addons:
|
||||
postgresql: "9.6"
|
||||
|
||||
before_install:
|
||||
- export PLUGIN_NAME=redmine_messenger
|
||||
- export REDMINE_PATH=$HOME/redmine
|
||||
- export REDMINE_GIT_REPO=git://github.com/redmine/redmine.git
|
||||
- git clone $REDMINE_GIT_REPO $REDMINE_PATH
|
||||
- if [[ "$REDMINE_VER" == "master" ]]; then wget https://www.redmine.org/attachments/download/21044/use_migration_context_with_test2.patch; fi
|
||||
- if [[ "$REDMINE_VER" == "master" ]]; then patch -p0 < use_migration_context_with_test2.patch; fi
|
||||
- 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 test/support/additional_environment.rb $REDMINE_PATH/config/
|
||||
- cp test/support/database-$DB-travis.yml $REDMINE_PATH/config/database.yml
|
||||
- cd $REDMINE_PATH
|
||||
|
||||
before_script:
|
||||
# - bundle exec rake redmine:load_default_data REDMINE_LANG=en
|
||||
# - bundle exec rake db:structure:dump
|
||||
- bundle exec rake db:create
|
||||
- bundle exec rake db:migrate
|
||||
- bundle exec rake redmine:plugins:migrate
|
||||
|
||||
script:
|
||||
- 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
|
||||
5
test/support/additional_environment.rb
Normal file
5
test/support/additional_environment.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# for travis debugging
|
||||
# config.logger = Logger.new(STDOUT)
|
||||
# config.logger.level = Logger::INFO
|
||||
# config.log_level = :info
|
||||
|
||||
8
test/support/database_postgresql_travis.yml
Normal file
8
test/support/database_postgresql_travis.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
test:
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
pool: 5
|
||||
database: travis_ci_test
|
||||
user: postgres
|
||||
|
||||
|
||||
Reference in New Issue
Block a user