.travis.yml 2.59 KB
Newer Older
1 2 3 4 5 6
language: php

php:
  - 5.4

branches:
7 8
  except:
    - 7.x-1.x
9 10 11 12 13 14

mysql:
  database: drupal
  username: root
  encoding: utf8

15 16 17 18 19 20 21 22 23 24 25 26
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

27 28 29 30
install:
  - sudo apt-get update > /dev/null
  - "mysql -e 'create database drupal;'"

31 32 33
  # Install latest Drush 6.
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - composer global require --no-interaction drush/drush:6.*
34 35 36

  # Build Behat dependencies
  - cd ./tests/behat
37
  - composer install --no-interaction
38 39 40 41 42 43 44 45 46 47 48
  - cd ../../../

  # Build Codebase
  - mkdir private_files
  - mkdir profiles
  - mv commerce_kickstart profiles/
  - mkdir drupal
  - mv profiles drupal/

  # Test the current branch
  - cd drupal
49 50
  - 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
51 52
  - cd ../

53 54 55
  # Download an old version to test upgrading from.
  - if [[ "$UPGRADE" != none ]]; then drush dl commerce_kickstart-$UPGRADE; fi

56 57 58 59 60 61 62 63 64 65 66 67 68
  # Setup files
  - sudo chmod -R 777 drupal/sites/all

  # Setup display for Selenium
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 5

  # Get Selenium
  - wget http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar
  - java -jar selenium-server-standalone-2.37.0.jar > /dev/null 2>&1 &
  - sleep 5

69 70 71
   # Disable sendmail
  - echo sendmail_path=`which true` >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

72 73
before_script:

74 75 76 77 78 79 80 81 82
  # 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
83 84 85 86 87 88
  - drush runserver --server=builtin 8888 > /dev/null 2>&1 &
  - sleep 3
  - cd profiles/commerce_kickstart/tests/behat

script:

89 90
  - DISTRO=`echo $TRAVIS_BUILD_DIR | sed -e "s/\/[^\/]*$//"`
  - export BEHAT_PARAMS="extensions[Drupal\\DrupalExtension\\Extension][drupal][drupal_root]=$DISTRO/drupal"
91
  - ./bin/behat --config behat.travis.yml
92 93 94 95

notifications:

  irc: "chat.freenode.net#drupal-commerce"