.travis.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. language: php
  2. php:
  3. - 5.6
  4. - 7.0
  5. env:
  6. global:
  7. - PATH=$PATH:/home/travis/.composer/vendor/bin
  8. install:
  9. - composer self-update
  10. before_script:
  11. # Set sendmail so drush doesn't throw an error during site install.
  12. - echo "sendmail_path=`which true`" >> `php --ini | grep "Loaded Configuration" | awk '{print $4}'`
  13. # Create database.
  14. - mysql -e 'create database drupal'
  15. # Install Drupal 8 target site.
  16. - cd tests
  17. - mkdir -p themes modules profiles
  18. - composer install --prefer-dist
  19. - ./vendor/bin/drush si standard -y --db-url=mysql://travis:@127.0.0.1/drupal
  20. # Test latest commit on current branch.
  21. - git clone --branch=$TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git modules/config_filter
  22. - ./vendor/bin/drush en config_filter -y
  23. # Run Drush web server.
  24. - ./vendor/bin/drush --debug runserver :8888 > ~/debug.txt 2>&1 &
  25. - sleep 4s
  26. - chmod -R ug+w sites
  27. script:
  28. - cd $TRAVIS_BUILD_DIR
  29. - cd tests
  30. - ./vendor/bin/phpcs --config-set installed_paths ../../drupal/coder/coder_sniffer
  31. - ./vendor/bin/phpcs --config-set show_progress 1
  32. - ./vendor/bin/phpcs --warning-severity=0 --standard=Drupal,DrupalPractice ../src
  33. - ./vendor/bin/phpunit
  34. notifications:
  35. email: false