forked from annikoff/redmine_plugin_computed_custom_field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (54 loc) · 1.93 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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