This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from AronNovak/133-travis-7.x
.travis.yml fix for 7.x
- Loading branch information
Showing
5 changed files
with
60 additions
and
33 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 |
---|---|---|
@@ -1,38 +1,51 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.6 | ||
- 7.0 | ||
|
||
mysql: | ||
database: drupal | ||
username: root | ||
encoding: utf8 | ||
|
||
before_script: | ||
# navigate out of module directory to prevent blown stack by recursive module lookup | ||
# Navigate out of module directory to prevent blown stack by recursive module lookup | ||
- cd ../.. | ||
|
||
# install drush | ||
- pear channel-discover pear.drush.org | ||
- pear install drush/drush-5.8.0 | ||
- phpenv rehash | ||
# Install Drush | ||
- composer global require drush/drush | ||
- export PATH=$PATH:~/.composer/vendor/bin | ||
|
||
# install php packages required for running a web server from drush on php 5.3 | ||
# Install php packages required for running Drupal | ||
- sudo apt-get update > /dev/null | ||
- sudo apt-get install -y --force-yes php5-cgi php5-mysql | ||
- sudo apt-get install -y --force-yes php5-mysql | ||
|
||
# create new site, stubbing sendmail path with true to prevent delivery errors and manually resolving drush path | ||
- mysql -e 'create database drupal' | ||
- php -d sendmail_path=`which true` `pear config-get php_dir`/drush/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/drupal --enable=simpletest og | ||
# Try to avoid MySQL has gone away errors | ||
- mysql -e "SET GLOBAL wait_timeout = 36000;" | ||
- mysql -e "SET GLOBAL max_allowed_packet = 134209536;" | ||
- mysql -e "SHOW VARIABLES LIKE 'max_allowed_packet';" | ||
- mysql -e "SHOW VARIABLES LIKE 'wait_timeout';" | ||
|
||
# reference and enable module in build site | ||
- ln -s $(readlink -e $(cd -)) og/drupal/sites/all/modules/og | ||
- cd og/drupal | ||
# enable OG-UI, so drush will auto-download all dependencies | ||
# Create new site, stubbing sendmail path with true to prevent delivery errors | ||
- mysql -e 'CREATE DATABASE drupal' | ||
- export PHP_OPTIONS="-d sendmail_path=`which true`" | ||
- drush --yes core-quick-drupal --core=drupal-7.x --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/drupal --enable=simpletest og | ||
- export DRUPAL_ROOT=og/drupal-7.x | ||
|
||
# Reference and enable module in build site | ||
- ln -s $(readlink -e $(cd -)) $DRUPAL_ROOT/sites/all/modules/og | ||
- cd $DRUPAL_ROOT | ||
|
||
# Enable OG-UI, so drush will auto-download all dependencies | ||
- drush --yes pm-enable og_ui | ||
|
||
# start a web server on port 8080, run in the background; wait for initialization | ||
# Create webserver for the Simpletest | ||
# Mandatory despite the fact that the tests can be | ||
# executed from CLI! | ||
- drush runserver 127.0.0.1:8080 & | ||
- until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done | ||
|
||
script: drush test-run "Organic groups","Organic groups access","Organic groups context","Organic groups field access","Organic groups UI" --uri=http://127.0.0.1:8080 | ||
script: | ||
- 'php scripts/run-tests.sh --url http://127.0.0.1:8080 --php $(phpenv which php) --concurrency 2 --verbose --color "Organic groups","Organic groups access","Organic groups context","Organic groups field access","Organic groups UI" 2>&1 | tee /tmp/simpletest-result.txt' | ||
- '! egrep -i "([1-9]+ fail)|(Fatal error)|([1-9]+ exception)" /tmp/simpletest-result.txt' |
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