.travis.yml 3.42 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
env:
  - UPGRADE=none
17 18 19
  - UPGRADE=7.x-2.20
  - UPGRADE=7.x-2.19
  - UPGRADE=7.x-2.18
20
  - UPGRADE=7.x-2.17
21 22
  - UPGRADE=7.x-2.16
  - UPGRADE=7.x-2.15
23
  - UPGRADE=7.x-2.14
24
  - UPGRADE=7.x-2.13
25 26 27 28 29 30
  - 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
31
  - UPGRADE=7.x-2.6
32
  - UPGRADE=7.x-2.5
33 34 35 36
  - UPGRADE=7.x-2.4
  - UPGRADE=7.x-2.3
  - UPGRADE=7.x-2.2
  - UPGRADE=7.x-2.1
37 38
  - UPGRADE=7.x-2.0

39 40 41
matrix:
  fast_finish: true

42 43 44 45
install:
  - sudo apt-get update > /dev/null
  - "mysql -e 'create database drupal;'"

46 47
  # Install latest Drush 6.
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
48
  - composer global require --no-interaction --prefer-source drush/drush:6.*
49 50
  - drush dl -y drupalorg_drush-7.x-1.x-dev --destination=$HOME/.drush
  - drush cc drush
51 52 53

  # Build Behat dependencies
  - cd ./tests/behat
54
  - composer install --no-interaction --prefer-source
55 56
  - cd ../../../

57 58 59 60
  # Setting Behat environment
  - DISTRO=`echo $TRAVIS_BUILD_DIR | sed -e "s/\/[^\/]*$//"`
  - export BEHAT_PARAMS="extensions[Drupal\\DrupalExtension\\Extension][drupal][drupal_root]=$DISTRO/drupal"

61 62 63 64 65 66 67
  # Build Codebase
  - mkdir private_files
  - mkdir profiles
  - mv commerce_kickstart profiles/
  - mkdir drupal
  - mv profiles drupal/

68
  # Build the current branch
69
  - cd drupal
70 71
  - 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
72 73
  - cd ../

74 75 76 77
  # Verify that all the .make files will work on Drupal.org.
  - drush verify-makefile drupal/profiles/commerce_kickstart/drupal-org.make
  - find drupal/profiles/commerce_kickstart/modules -name \*.make -print0 | xargs -0 -n1 drush verify-makefile

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

81 82 83 84 85 86 87 88 89
  # 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
90 91
  - wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.1.jar
  - java -jar selenium-server-standalone-2.42.1.jar > /dev/null 2>&1 &
92
  - until netstat -an 2>/dev/null | grep '4444.*LISTEN'; do true; done
93

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

97 98
before_script:

99 100 101
  # 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
102
  - drush pm-disable dblog --yes
103 104 105 106 107 108
  - 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
109
  - drush runserver --server=builtin 8888 > /dev/null 2>&1 &
110
  - until netstat -an 2>/dev/null | grep '8888.*LISTEN'; do true; done
111 112 113 114 115
  - cd profiles/commerce_kickstart/tests/behat

script:

  - ./bin/behat --config behat.travis.yml
116 117 118 119

notifications:

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