language: php
dist: trusty

php: nightly
env: TEST_SCRIPT=scripts/test/unit.sh

matrix:
  include:
    - php: 5.6
      env: TEST_SCRIPT=scripts/test/security.sh
    - php: 7.3
      env: TEST_SCRIPT=scripts/test/security.sh

    - php: 5.6
      env: TEST_SCRIPT=scripts/test/installer.sh

    - php: 5.6
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.0
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.1
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.2
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.3
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: nightly
      env: TEST_SCRIPT=scripts/test/unit.sh

    - php: 7.3
      env: TEST_SCRIPT=scripts/test/slow.sh

  allow_failures:
    - php: nightly

  fast_finish: true

cache:
  directories:
    - $HOME/.composer/cache
    - $HOME/.drush/cache

install:
  - composer install --no-interaction

script: "$TEST_SCRIPT"

language: php
dist: trusty

php: nightly
env: TEST_SCRIPT=scripts/test/unit.sh

matrix:
  include:
    - php: 5.6
      env: TEST_SCRIPT=scripts/test/security.sh
    - php: 7.3
      env: TEST_SCRIPT=scripts/test/security.sh

    - php: 5.6
      env: TEST_SCRIPT=scripts/test/installer.sh

    - php: 5.6
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.0
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.1
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.2
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: 7.3
      env: TEST_SCRIPT=scripts/test/unit.sh
    - php: nightly
      env: TEST_SCRIPT=scripts/test/unit.sh

    - php: 7.3
      env: TEST_SCRIPT=scripts/test/slow.sh

  allow_failures:
    - php: nightly

  fast_finish: true

cache:
  directories:
    - $HOME/.composer/cache
    - $HOME/.drush/cache

install:
  # No scripts on Travis, because Box isn't needed, and anyway it can't be
  # installed under PHP <7.1.
  - composer install --no-interaction --no-scripts

script: "$TEST_SCRIPT"

Use --no-scripts to install on Travis
Use --no-scripts to install on Travis
