language: php

dist: trusty

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

php:
  - 7.1
  - 7.2
  - nightly

env:
  global:
    - DB=SQLITE
    - PDO=1

matrix:
  fast_finish: true
  include:
    - php: 7.2
      env: PDO=0 PHPCS_TEST=1
  allow_failure:
    - php: nightly

before_script:
  # Init PHP
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - export PATH=~/.composer/vendor/bin:$PATH
  - echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

# Install composer dependencies
  - composer validate
  - composer require --no-update silverstripe/recipe-cms:1.0.x-dev
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
  - if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi

script:
  - vendor/bin/phpunit vendor/silverstripe/framework/tests
  - if [[ $PHPCS_TEST ]]; then composer run-script lint; fi

language: php

dist: trusty

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

php:
  - 7.1
  - 7.2
  - nightly

env:
  global:
    - DB=SQLITE
    - PDO=1

matrix:
  fast_finish: true
  include:
    - php: 7.2
      env: PDO=0 PHPCS_TEST=1
  allow_failure:
    - php: nightly

before_script:
  # Init PHP
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - export PATH=~/.composer/vendor/bin:$PATH
  - echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

# Install composer dependencies
  - composer validate
  - composer require --no-update silverstripe/recipe-cms:2.x-dev
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
  - if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi

script:
  - vendor/bin/phpunit vendor/silverstripe/framework/tests
  - if [[ $PHPCS_TEST ]]; then composer run-script lint; fi

Update recipe-cms dependency for builds
Update recipe-cms dependency for builds
