language: php
dist: xenial

services:
  - mysql

cache:
  apt: true
  directories:
  - "$HOME/.composer/cache"
  - "$HOME/.drush/cache"
  - "$HOME/.npm"

php:
  - 7.3

branches:
  only:
    - /^8\.([0-9]+|x)\-[0-9]+\.([0-9]+|x)$/

env:
  global:
    - PATH="$PATH:$HOME/.composer/vendor/bin"
    - COMPOSER_MEMORY_LIMIT=-1

matrix:
  allow_failures:
    - env: DRUPAL_TRAVIS_DRUPAL_VERSION=~8.8.0
  include:
    - env: DRUPAL_TRAVIS_DRUPAL_VERSION=~8.7.0
    - env: DRUPAL_TRAVIS_DRUPAL_VERSION=~8.8.0 DRUPAL_TRAVIS_TEST_DEPRECATION=false
      php: 7.2
    - env: DRUPAL_TRAVIS_DRUPAL_VERSION=~8.8.0
    - env: DRUPAL_TRAVIS_DRUPAL_VERSION=~8.8.0 DRUPAL_TRAVIS_TEST_DEPRECATION=false


before_install:
  - composer global require thunder/travis

install:
  - test-drupal-project prepare_build
  - composer require npm-asset/select2:^4.0.7 --working-dir=/tmp/test/select2/install

script:
  - test-drupal-project

notifications:
  email: false
