language: php

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

matrix:
  include:
    - php: 5.6
      dist: trusty
      env: LARAVEL=5.2.* PHPUNIT=~5.0 TESTBENCH=3.2.*
    - php: 5.6
      dist: trusty
      env: LARAVEL=5.3.* PHPUNIT=~5.0 TESTBENCH=3.3.*
    - php: 5.6
      dist: trusty
      env: LARAVEL=5.4.* PHPUNIT=~5.7 TESTBENCH=3.4.*
    - php: 7.0
      env: LARAVEL=5.2.* PHPUNIT=~5.0 TESTBENCH=3.2.*
    - php: 7.0
      env: LARAVEL=5.3.* PHPUNIT=~5.0 TESTBENCH=3.3.*
    - php: 7.0
      env: LARAVEL=5.4.* PHPUNIT=~5.7 TESTBENCH=3.4.*
    - php: 7.0
      env: LARAVEL=5.5.* PHPUNIT=~6.0 TESTBENCH=3.5.*
    - php: 7.1
      env: LARAVEL=5.2.* PHPUNIT=~5.0 TESTBENCH=3.2.*
    - php: 7.1
      env: LARAVEL=5.3.* PHPUNIT=~5.0 TESTBENCH=3.3.*
    - php: 7.1
      env: LARAVEL=5.4.* PHPUNIT=~5.7 TESTBENCH=3.4.*
    - php: 7.1
      env: LARAVEL=5.5.* PHPUNIT=~6.0 TESTBENCH=3.5.*
    - php: 7.1
      env: LARAVEL=5.6.* PHPUNIT=^7.0 TESTBENCH=3.6.*
    - php: 7.1
      env: LARAVEL=5.7.* PHPUNIT=^7.0 TESTBENCH=3.7.*
    - php: 7.1
      env: LARAVEL=5.8.* PHPUNIT=^7.0 TESTBENCH=3.8.*
    - php: 7.2
      env: LARAVEL=5.4.* PHPUNIT=~5.7 TESTBENCH=3.4.*
    - php: 7.2
      env: LARAVEL=5.5.* PHPUNIT=~6.0 TESTBENCH=3.5.*
    - php: 7.2
      env: LARAVEL=5.6.* PHPUNIT=^7.0 TESTBENCH=3.6.*
    - php: 7.2
      env: LARAVEL=5.7.* PHPUNIT=^7.0 TESTBENCH=3.7.*
    - php: 7.2
      env: LARAVEL=5.8.* PHPUNIT=^7.0 TESTBENCH=3.8.*
    - php: 7.2
      env: LARAVEL=6.* PHPUNIT=^8.4 TESTBENCH=4.*
    - php: 7.2
      env: LARAVEL=7.* PHPUNIT=^8.4 TESTBENCH=5.*
    - php: 7.3
      env: LARAVEL=5.7.* PHPUNIT=^7.0 TESTBENCH=3.7.*
    - php: 7.3
      env: LARAVEL=5.8.* PHPUNIT=^7.0 TESTBENCH=3.8.*
    - php: 7.3
      env: LARAVEL=6.* PHPUNIT=^8.4 TESTBENCH=4.*
    - php: 7.3
      env: LARAVEL=7.* PHPUNIT=^8.4 TESTBENCH=5.*
    - php: 7.3
      env: LARAVEL=8.* PHPUNIT=^9.0 TESTBENCH=6.*
    - php: 7.4
      env: LARAVEL=5.8.* PHPUNIT=^7.0 TESTBENCH=3.8.*
    - php: 7.4
      env: LARAVEL=6.* PHPUNIT=^8.4 TESTBENCH=4.*
    - php: 7.4
      env: LARAVEL=7.* PHPUNIT=^8.4 TESTBENCH=5.*
    - php: 7.4
      env: LARAVEL=8.* PHPUNIT=^9.0 TESTBENCH=6.*
    - php: 8.0
      env: LARAVEL=6.* PHPUNIT=^8.4 TESTBENCH=4.*
    - php: 8.0
      env: LARAVEL=7.* PHPUNIT=^8.4 TESTBENCH=5.*
    - php: 8.0
      env: LARAVEL=8.* PHPUNIT=^9.0 TESTBENCH=6.*
    - php: 8.0
      env: LARAVEL=9.* PHPUNIT=^9.0 TESTBENCH=7.*
    - php: 8.1
      env: LARAVEL=8.* PHPUNIT=^9.0 TESTBENCH=6.*
    - php: 8.1
      env: LARAVEL=9.* PHPUNIT=^9.0 TESTBENCH=7.*
    - php: 8.1
      env: LARAVEL=10.* PHPUNIT=^10.0 TESTBENCH=8.*
    - php: 8.2
      env: LARAVEL=9.* PHPUNIT=^9.0 TESTBENCH=7.*
    - php: 8.2
      env: LARAVEL=10.* PHPUNIT=^10.0 TESTBENCH=8.*
    - php: 8.2
      env: LARAVEL=11.* PHPUNIT=^10.0 TESTBENCH=9.*
    - php: 8.3
      env: LARAVEL=10.* PHPUNIT=^10.0 TESTBENCH=8.*
    - php: 8.3
      env: LARAVEL=11.* PHPUNIT=^10.0 TESTBENCH=9.*

before_install:
  - travis_retry composer self-update
  - travis_retry composer require "illuminate/contracts:${LARAVEL}" "phpunit/phpunit:${PHPUNIT}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update

install: COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-dist --no-interaction --no-suggest

script: vendor/bin/phpunit
