-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
114 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
service_name: travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
coverage | ||
Gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: ruby | ||
rvm: | ||
- 2.2 | ||
- 2.3 | ||
env: | ||
- REDMINE_VER=3.4-stable | ||
script: | ||
- export TESTSPACE=`pwd`/testspace | ||
- export NAME_OF_PLUGIN=redmine_wiki_extensions | ||
- export PATH_TO_PLUGIN=`pwd` | ||
- export PATH_TO_REDMINE=$TESTSPACE/redmine | ||
- mkdir $TESTSPACE | ||
- bash -x ./travis.sh | ||
notifications: | ||
slack: | ||
secure: DcS+4xwoLJorhegJKOARaQ+ug9wFnB98QuWew72hbY2Vi+jPZbuMv84lpdu59echFpWpTmQyAIsUDEibaWq1/u/qauBXgAidiY4UG5ELb34JwMcbEq0BuSne4BGA3m3psRMlve3RstuEzX2XnzTplQ73Go9zymAkL/rHeS5oBlyre6Ktjvh+zNtI3R5Zyn4NrnNL6Gpf8IJDN3KwQS/SIoCm9dzqNTuHJvBYSohJfKmIe6QpkjaYsUev778/GQuck9ZZNWxdjP4IctkvW+p7PxeyEZZUNjQRTNUI+Py33JZKUQgeydob9N+wg7VLeJitq8GoSqeMxmLjJJy5D8omf29KqsyVK+Ym+r5QVKQDimztNI6xQuykifZiktRUleIOjrPSZOhXDCzPIi4rapTagiWSGVATJmDpKx2b/MzjKGBjFyVrCA0GA/SmxFtZwBzaIjj0D0F6W0Vdc+25MIL6lBuAB1ZkIoMCKKOkoMPg9rfW5YXbNQ0hYpXUjduottNpU2HwJm+glbI4fvw7NKlmy1NipQNkvezv8IUmO8SwBS7EK9Sxfiv61Z2VAJEFzFVef8TdZSjyubCdy3hEUpgRWCx1wxhwJgoTgZ3ssyQVWRqvBGpZdMRtsC52yf6uMopqW8lbvpxKh7/ISivlL3cWh6SvExzQOqZeWDQNi6hLEKE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/bin/bash | ||
|
||
#/bin/bash | ||
|
||
set -e | ||
|
||
if [[ ! "$TESTSPACE" = /* ]] || | ||
[[ ! "$PATH_TO_REDMINE" = /* ]] || | ||
[[ ! "$REDMINE_VER" = * ]] || | ||
[[ ! "$NAME_OF_PLUGIN" = * ]] || | ||
[[ ! "$PATH_TO_PLUGIN" = /* ]]; | ||
then | ||
echo "You should set"\ | ||
" TESTSPACE, PATH_TO_REDMINE, REDMINE_VER"\ | ||
" NAME_OF_PLUGIN, PATH_TO_PLUGIN"\ | ||
" environment variables" | ||
echo "You set:"\ | ||
"$TESTSPACE"\ | ||
"$PATH_TO_REDMINE"\ | ||
"$REDMINE_VER"\ | ||
"$NAME_OF_PLUGIN"\ | ||
"$PATH_TO_PLUGIN" | ||
exit 1; | ||
fi | ||
|
||
export RAILS_ENV=test | ||
|
||
export REDMINE_GIT_REPO=git://github.com/redmine/redmine.git | ||
export REDMINE_GIT_TAG=$REDMINE_VER | ||
export BUNDLE_GEMFILE=$PATH_TO_REDMINE/Gemfile | ||
|
||
if [ -f Gemfile_for_test ] | ||
then | ||
cp Gemfile_for_test Gemfile | ||
fi | ||
|
||
# checkout redmine | ||
git clone $REDMINE_GIT_REPO $PATH_TO_REDMINE | ||
cp test/fixtures/* ${PATH_TO_REDMINE}/test/fixtures/ | ||
cd $PATH_TO_REDMINE | ||
if [ ! "$REDMINE_GIT_TAG" = "master" ]; | ||
then | ||
git checkout -b $REDMINE_GIT_TAG origin/$REDMINE_GIT_TAG | ||
fi | ||
|
||
# create a link to the backlogs plugin | ||
ln -sf $PATH_TO_PLUGIN plugins/$NAME_OF_PLUGIN | ||
|
||
|
||
cat << EOS > config/database.yml | ||
test: | ||
adapter: sqlite3 | ||
database: db/test.sqlite3 | ||
EOS | ||
|
||
|
||
# install gems | ||
bundle install | ||
|
||
# run redmine database migrations | ||
bundle exec rake db:migrate | ||
|
||
# run plugin database migrations | ||
bundle exec rake redmine:plugins:migrate | ||
|
||
# install redmine database | ||
#bundle exec rake redmine:load_default_data REDMINE_LANG=en | ||
|
||
bundle exec rake db:structure:dump | ||
|
||
# run tests | ||
# bundle exec rake TEST=test/unit/role_test.rb | ||
bundle exec rake redmine:plugins:test NAME=$NAME_OF_PLUGIN | ||
|