52 lines
2.1 KiB
YAML
52 lines
2.1 KiB
YAML
language: ruby
|
|
|
|
rvm:
|
|
- 2.5.3
|
|
- 2.4.5
|
|
- 2.3.8
|
|
|
|
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
|
|
|
|
addons:
|
|
postgresql: "9.6"
|
|
apt:
|
|
sources:
|
|
- mysql-5.7-trusty
|
|
packages:
|
|
- mysql-server
|
|
- mysql-client
|
|
|
|
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
|
|
|
|
before_script:
|
|
- if [[ "$DB" == "postgresql" ]]; then psql -c 'create database travis_ci_test;' -U postgres; fi
|
|
- if [[ "$DB" == "mysql" ]]; then mysql -e "use mysql; update user set authentication_string=PASSWORD('travis_ci_test') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"; fi
|
|
- if [[ "$DB" == "mysql" ]]; then mysql_upgrade -u root -ptravis_ci_test; fi
|
|
- if [[ "$DB" == "mysql" ]]; then service mysql restart; fi
|
|
- if [[ "$DB" == "mysql" ]]; then mysql -e 'CREATE DATABASE IF NOT EXISTS travis_ci_test;'; fi
|
|
- bundle exec rake db:migrate
|
|
- bundle exec rake 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
|