From b7e55f1bbbbef27b3611651099a2d7bf2016a0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 21 Dec 2018 07:57:09 +0100 Subject: [PATCH] Travis CI --- .travis.yml | 63 ++++++++++++++++++++++++++++++++++++++ test/ci/redmine_install.sh | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..864bc11 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,63 @@ +# encoding: utf-8 +# +# Redmine plugin for Custom Workflows +# +# Copyright Anton Argirov +# Copyright Karel Pičman +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +language: ruby + +sudo: true + +dist: xenial + +rvm: + - 2.5 + +before_install: + - mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;' + - psql -c 'create database test;' -U postgres + - export WORKSPACE=`pwd`/workspace + - export $PATH_TO_CUSTOM_WORKFLOWS=`pwd` + - export PATH_TO_REDMINE=$WORKSPACE/redmine + - export BUNDLE_GEMFILE=$PATH_TO_REDMINE/Gemfile + - mkdir -p ${WORKSPACE} + - cp -f ./test/ci/${DB}.yml ${WORKSPACE}/database.yml + - bash -x ./test/ci/redmine_install.sh -c + - bash -x ./test/ci/redmine_install.sh -i + +install: + +script: + - bash -x ./test/ci/redmine_install.sh -t + +after_script: + - bash -x ./test/ci/redmine_install.sh -u + +env: + - DB=sqlite + - DB=mysql + - DB=postgres + +cache: bundler + +services: + - mysql + - postgresql + +addons: + mariadb: '10.3' diff --git a/test/ci/redmine_install.sh b/test/ci/redmine_install.sh index 6fd8cc5..d9d353f 100644 --- a/test/ci/redmine_install.sh +++ b/test/ci/redmine_install.sh @@ -65,7 +65,7 @@ install() echo current directory is `pwd` # Create a link to the Custom Workflows plugin - ln -sf $PATH_TO_CUSTOMWORKFLOWS plugins/redmine_custom_workflows + ln -sf $PATH_TO_CUSTOM_WORKFLOWS plugins/redmine_custom_workflows # Copy database.yml cp $WORKSPACE/database.yml config/