From 4e94a920b45a754b213fc73e594725dbe1dfa1d4 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Wed, 27 Apr 2016 09:25:06 -0300 Subject: [PATCH] Updated .travis.yml; --- .travis.yml | 20 ++++++++++++-------- tests/ci/travis/setup_firebird2.1.sh | 8 ++++++++ tests/ci/travis/setup_firebird2.5.sh | 8 ++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 tests/ci/travis/setup_firebird2.1.sh create mode 100644 tests/ci/travis/setup_firebird2.5.sh diff --git a/.travis.yml b/.travis.yml index 3d204ca..86dc03c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,14 +30,11 @@ cache: before_install: - sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf" - sudo apt-get update -qq - - sudo apt-get install -qq firebird$FB-super firebird$FB-dev expect - - if [[ "$FB" == "2.1" ]]; then export DEBIAN_FRONTEND=readline; fi - - if [[ "$FB" == "2.1" ]]; then expect tests/ci/travis/dpkg_firebird2.1.exp; fi - - if [[ "$FB" == "2.1" ]]; then export DEBIAN_FRONTEND=dialog; fi - - if [[ "$FB" == "2.5" ]]; then export FIREBIRD_SERVER_CONFIG=/etc/default/firebird$FB; fi - - if [[ "$FB" == "2.5" ]]; then sudo sed /ENABLE_FIREBIRD_SERVER=/s/no/yes/ -i $FIREBIRD_SERVER_CONFIG; fi - - if [[ "$FB" == "2.5" ]]; then cat $FIREBIRD_SERVER_CONFIG | grep ENABLE_FIREBIRD_SERVER; fi - - sudo service firebird$FB-super start + + #installing and starting Firebird Server + - sudo chmod +x tests/ci/travis/*.sh + - sudo tests/ci/travis/setup_firebird${FB}.sh + - export PATH=$PATH:/usr/local/firebird/bin # initialize databases - echo "CREATE DATABASE 'localhost:/tmp/TEST.FDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8;" > /tmp/create_test.sql @@ -51,11 +48,18 @@ before_install: - (cd php-src/ext/pdo_firebird/; phpize && ./configure && make && sudo make install) install: + #enabling pdo_firebird - echo "extension=pdo_firebird.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - php -m | grep -i pdo + + #preparing Yii2 environment - travis_retry composer self-update && composer --version - travis_retry composer global require "fxp/composer-asset-plugin:~1.1.3" --prefer-dist --no-interaction - export PATH="$HOME/.composer/vendor/bin:$PATH" + + #installing composer dependency - travis_retry composer install --prefer-dist --no-interaction + #needed to use tests of Yii2 - rm vendor/yiisoft/yii2-dev -Rf - travis_retry composer install --prefer-source -o --no-interaction diff --git a/tests/ci/travis/setup_firebird2.1.sh b/tests/ci/travis/setup_firebird2.1.sh new file mode 100644 index 0000000..249931f --- /dev/null +++ b/tests/ci/travis/setup_firebird2.1.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +apt-get install -qq firebird2.1-super firebird2.1-dev expect +export DEBIAN_FRONTEND=readline +expect ${TRAVIS_BUILD_DIR}/tests/ci/travis/dpkg_firebird2.1.exp +export DEBIAN_FRONTEND=dialog + +service firebird2.1-super start \ No newline at end of file diff --git a/tests/ci/travis/setup_firebird2.5.sh b/tests/ci/travis/setup_firebird2.5.sh new file mode 100644 index 0000000..35532fd --- /dev/null +++ b/tests/ci/travis/setup_firebird2.5.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +apt-get install -qq firebird2.5-super firebird2.5-dev +export FIREBIRD_SERVER_CONFIG=/etc/default/firebird$FB +sed /ENABLE_FIREBIRD_SERVER=/s/no/yes/ -i $FIREBIRD_SERVER_CONFIG +car $FIREBIRD_SERVER_CONFIG | grep ENABLE_FIREBIRD_SERVER + +service firebird2.5-super start \ No newline at end of file