Skip to content

Commit

Permalink
Updated .travis.yml;
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Apr 27, 2016
1 parent 900b0bd commit 4e94a92
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
8 changes: 8 additions & 0 deletions tests/ci/travis/setup_firebird2.1.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions tests/ci/travis/setup_firebird2.5.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e94a92

Please sign in to comment.