.travis.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. language: php
  2. php:
  3. - 5.3
  4. - 5.4
  5. - 5.5
  6. - 5.6
  7. - hhvm
  8. matrix:
  9. fast_finish: true
  10. allow_failures:
  11. - php: hhvm
  12. mysql:
  13. database: date_popup_authored_test
  14. username: root
  15. encoding: utf8
  16. before_install:
  17. - sudo apt-get update > /dev/null
  18. install:
  19. # install php packages required for running a web server from drush on php 5.3
  20. - sudo apt-get install -y --force-yes php5-cgi php5-mysql
  21. # add composer's global bin directory to the path
  22. # see: https://github.com/drush-ops/drush#install---composer
  23. - export PATH="$HOME/.composer/vendor/bin:$PATH"
  24. # install drush globally
  25. - composer global require drush/drush:6.*
  26. before_script:
  27. # Sendmail support.
  28. - if [[ "$TRAVIS_PHP_VERSION" != hhvm* ]]; then echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
  29. # hhvm ignores sendmail_path and hhvm.mail.sendmail_path settings presently...
  30. - if [[ "$TRAVIS_PHP_VERSION" == hhvm* ]]; then sudo ln -s /bin/true /usr/local/bin/sendmail; fi
  31. # navigate out of module directory to prevent blown stack by recursive module lookup
  32. - cd ../..
  33. # create new site, stubbing sendmail path with true to prevent delivery errors and manually resolving drush path
  34. - mysql -e 'create database date_popup_authored_test'
  35. - php ~/.composer/vendor/bin/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/date_popup_authored_test --enable=simpletest date_popup_authored_test
  36. # reference and enable travis_ci_drupal_module_example in build site
  37. - ln -s $(readlink -e $(cd -)) date_popup_authored_test/drupal/sites/all/modules/date_popup_authored
  38. - cd date_popup_authored_test/drupal
  39. - drush --yes pm-enable date date_popup date_popup_authored
  40. # start a web server on port 8080, run in the background; wait for initialization
  41. - drush runserver 127.0.0.1:8080 &
  42. - until netstat -an 2>/dev/null | grep '8080.*LISTEN'; do true; done
  43. script: drush test-run 'Date Popup Authored' --uri=http://127.0.0.1:8080