Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-extension / .travis.yml
1 language: php
2
3 php:
4   - 5.5
5   - 5.6
6   - 7.0
7
8 env:
9   global:
10     - PATH=$PATH:/home/travis/.composer/vendor/bin
11     - TRAVIS_NODE_VERSION="4.0.0"
12   matrix:
13     - DRUPAL_VERSION=6
14     - DRUPAL_VERSION=7
15     - DRUPAL_VERSION=8
16
17 matrix:
18   exclude:
19     - php: 5.6
20       env: DRUPAL_VERSION=6
21     - php: 7.0
22       env: DRUPAL_VERSION=6
23   allow_failures:
24     - php: 7.0
25       env: DRUPAL_VERSION=7
26     - php: 5.3
27
28 # Enable Travis containers.
29 sudo: false
30
31 install:
32   - composer self-update
33   # Use the example composer.json file for Drupal 8, and also install the behat drush endpoint.
34   - test ${DRUPAL_VERSION} -ne 8 || (cp doc/_static/composer.json.d8 ./composer.json && composer require --prefer-source drush-ops/behat-drush-endpoint drupal/drupal-driver:dev-master)
35   - composer install
36   # Install drush.
37   - composer global require drush/drush:~8.0
38   # Install the Behat Drush Endpoint for Drupal 7 tests.
39   - test ${DRUPAL_VERSION} -ne 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install))
40   # Pin node version.
41   # @see http://austinpray.com/ops/2015/09/20/change-travis-node-version.html
42   - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
43   - npm install
44
45 before_script:
46   # Set NODE_PATH for zombie driver.
47   - export NODE_PATH="`pwd`/node_modules"
48   # Define the module path according to the Drupal version being tested.
49   - test ${DRUPAL_VERSION} -eq 8 && export MODULE_PATH='drupal/modules' || export MODULE_PATH='drupal/sites/all/modules'
50   # Drupal 8 uses semantic versioning.
51   - test ${DRUPAL_VERSION} -eq 8 && export PROJECT_NAME='drupal-8.1.x' || export PROJECT_NAME="drupal-${DRUPAL_VERSION}.x"
52   # Set sendmail so drush doesn't throw an error during site install.
53   - echo "sendmail_path='true'" >> `php --ini | grep "Loaded Configuration" | awk '{print $4}'`
54   # Download and install Drupal so we can test API abilities.
55   - mysql -e 'create database drupal'
56   - drush --quiet dl ${PROJECT_NAME} --all --drupal-project-rename=drupal
57   - drush --yes --root=$PWD/drupal site-install --db-url=mysql://travis:@127.0.0.1/drupal
58   # Copy the static HTML that is used for blackbox testing in the web root.
59   - cp -r fixtures/blackbox $PWD/drupal
60   # Copy our test module to the correct location.
61   - cp -r fixtures/drupal${DRUPAL_VERSION}/modules/behat_test ${MODULE_PATH}
62   - cd drupal
63   - drush --yes en behat_test
64   - drush cc drush
65   - test ${DRUPAL_VERSION} -eq 6 || drush help behat
66   # Only revert features on Drupal 7.
67   - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test
68   # Disable the page cache on Drupal 8.
69   - test \! ${DRUPAL_VERSION} -eq 8 || drush --yes pmu page_cache
70   # Test with big_pipe enabled for Drupal 8.
71   - test \! ${DRUPAL_VERSION} -eq 8 || drush --yes en -y big_pipe
72   # Clear the cache on Drupal 6 and 7, rebuild on Drupal 8.
73   - test ${DRUPAL_VERSION} -eq 8 && drush cr || drush cc all || true
74   - drush --debug runserver :8888 > ~/debug.txt 2>&1 &
75   - cd -
76   - sleep 4s
77
78 script:
79   - find ./src -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
80   - vendor/bin/phpspec run -f pretty --no-interaction
81   - vendor/bin/behat -fprogress --strict
82   - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict
83   # Do not test the Drush profile unless Drupal 7 was installed.
84   - test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict
85
86 after_failure:
87   - cat ~/debug.txt