language: php

sudo: false

git:
    depth: 1

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

env:
  global:
  - TARGET=test

matrix:
    include:
        - php: 7.2
          env: PHPUNIT_FLAGS='--coverage-clover clover'
        - php: 7.2
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
        - php: 7.2
          env: TARGET=docs
        - php: 7.2
          env: TARGET=cs

        - php: 7.3
        - php: "7.4snapshot"
    fast_finish: true

install:
  - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

script:
  - if [ -x .travis/script_${TARGET}.sh ]; then .travis/script_${TARGET}.sh; fi;

after_success:
  - if [ -x .travis/sucess_${TARGET}.sh ]; then .travis/sucess_${TARGET}.sh; fi;
