Commit 68d27361 authored by Lars Olesen's avatar Lars Olesen

Issue #2229195 by lsolesen: Add upgrade tests on Travis

parent c57f4956
......@@ -4,25 +4,37 @@ php:
- 5.4
branches:
only:
- 7.x-2.x
except:
- 7.x-1.x
mysql:
database: drupal
username: root
encoding: utf8
env:
- UPGRADE=none
- UPGRADE=7.x-2.12
- UPGRADE=7.x-2.11
- UPGRADE=7.x-2.10
- UPGRADE=7.x-2.9
- UPGRADE=7.x-2.8
- UPGRADE=7.x-2.7
- UPGRADE=7.x-2.5
- UPGRADE=7.x-2.0
- UPGRADE=7.x-2.0-rc1
install:
- sudo apt-get update > /dev/null
- "mysql -e 'create database drupal;'"
- pear channel-discover pear.drush.org
- pear install drush/drush-6.1.0.0
- phpenv rehash
# Install latest Drush 6.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require --no-interaction drush/drush:6.*
# Build Behat dependencies
- cd ./tests/behat
- composer install
- composer install --no-interaction
- cd ../../../
# Build Codebase
......@@ -34,9 +46,13 @@ install:
# Test the current branch
- cd drupal
- drush make --prepare-install profiles/commerce_kickstart/build-commerce-kickstart.make --yes
- drush make --yes profiles/commerce_kickstart/drupal-org-core.make --prepare-install
- drush make --yes profiles/commerce_kickstart/drupal-org.make --no-core --contrib-destination=profiles/commerce_kickstart
- cd ../
# Download an old version to test upgrading from.
- if [[ "$UPGRADE" != none ]]; then drush dl commerce_kickstart-$UPGRADE; fi
# Setup files
- sudo chmod -R 777 drupal/sites/all
......@@ -50,11 +66,20 @@ install:
- java -jar selenium-server-standalone-2.37.0.jar > /dev/null 2>&1 &
- sleep 5
# Disable sendmail
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
- cd drupal
- echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- php `pear config-get php_dir`/drush/drush.php si commerce_kickstart --db-url=mysql://root:@127.0.0.1/drupal --account-name=admin --account-pass=admin --site-mail=admin@example.com --site-name="Commerce Kickstart" --yes
# Do the site install (either the current revision or old for the upgrade).
- if [[ "$UPGRADE" == none ]]; then cd drupal; else cd commerce_kickstart-$UPGRADE; fi
- drush si commerce_kickstart --db-url=mysql://root:@127.0.0.1/drupal --account-name=admin --account-pass=admin --site-mail=admin@example.com --site-name="Commerce Kickstart" --yes
- cd ../drupal
# If we're an upgrade test, run the upgrade process.
- if [[ "$UPGRADE" != none ]]; then cp -a ../commerce_kickstart-$UPGRADE/sites/default/* sites/default/ && drush updb --yes; fi
# Start server
- drush runserver --server=builtin 8888 > /dev/null 2>&1 &
- sleep 3
- cd profiles/commerce_kickstart/tests/behat
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment