language: php

dist: trusty

sudo: false

cache:
    directories:
        - vendor
        - $HOME/.composer/cache/files

env:
    global:
        - SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
        - SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1

before_install:
    - phpenv config-rm xdebug.ini || return 0

install:
    - travis_retry composer install
    - if [[ $TRAVIS_PHP_VERSION = nightly ]]; then phpenv global 7.1; ./vendor/bin/simple-phpunit install; phpenv global nightly; fi

script: ./vendor/bin/simple-phpunit

jobs:
    fast_finish: true
    include:
        - php: 7.1
        - php: 7.2
        - php: 7.3
        - php: 7.4
        - php: nightly
          env: SYMFONY_PHPUNIT_VERSION=7.2
        - stage: integration tests
          php: 7.3
          script: ./drupal_test.sh

language: php

dist: xenial

sudo: false

cache:
    directories:
        - vendor
        - $HOME/.composer/cache/files

env:
    global:
        - SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
        - SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1

before_install:
    - phpenv config-rm xdebug.ini || return 0

install:
    - travis_retry composer install
    - |
      # install the phpunit-bridge with PHP 7.4 when testing nightly
      if [[ $TRAVIS_PHP_VERSION = nightly ]]; then
          (cd / && wget https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/16.04/x86_64/php-7.4.tar.bz2 -O - | tar -xj)
          phpenv global 7.4;
          ./vendor/bin/simple-phpunit install;
          phpenv global nightly;
      fi

script: ./vendor/bin/simple-phpunit

jobs:
    fast_finish: true
    include:
        - php: 7.1
        - php: 7.2
        - php: 7.3
        - php: 7.4
        - php: nightly
          env: SYMFONY_PHPUNIT_VERSION=7.2
        - stage: integration tests
          php: 7.3
          script: ./drupal_test.sh

Install the phpunit-bridge with PHP 7.4 when testing nightly
Install the phpunit-bridge with PHP 7.4 when testing nightly
