language: php

env:
  global:
    - excludegroup=travis-ci-exclude

matrix:
  include:
    - php: hhvm
    - php: nightly
    - php: 7.0
    - php: 5.6
      env: excludegroup=travis-ci-exclude-56

  fast_finish: true
  allow_failures:
    - php: nightly
    - php: hhvm

cache:
  directories:
    - $HOME/.composer/cache
    - $HOME/.php-cs-fixer

notifications:
  email: false

before_script:
  - if [[ $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PHP_VERSION != nightly ]]; then
      phpenv config-rm xdebug.ini;
    fi
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction
  - travis_retry composer dump-autoload --optimize

script:
  - if [[ $TRAVIS_PULL_REQUEST_BRANCH = master ]]; then
      echo "Please open pull request from a feature / topic branch."
      exit 1;
    fi
  # Verify application version and Git tag match
  - composer lpv:application-version-guard
  - composer lpv:cs-lint
  - if [[ $excludegroup = travis-ci-exclude ]]; then
      composer lpv:test -- --exclude-group travis-ci-exclude;
    fi
  - if [[ $excludegroup = travis-ci-exclude-56 ]]; then
      composer lpv:test -- --exclude-group travis-ci-exclude-56;
    fi

language: php

env:
  global:
    - excludegroup=travis-ci-exclude

matrix:
  include:
    - php: hhvm
    - php: nightly
    - php: 7.0
    - php: 5.6
      env: excludegroup=travis-ci-exclude-56

  fast_finish: true
  allow_failures:
    - php: nightly
    - php: hhvm

cache:
  directories:
    - $HOME/.composer/cache
    - $HOME/.php-cs-fixer

notifications:
  email: false

before_script:
  - if [[ $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PHP_VERSION != nightly ]]; then
      phpenv config-rm xdebug.ini;
    fi
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction
  - travis_retry composer dump-autoload --optimize

script:
  - if [[ $TRAVIS_PULL_REQUEST_BRANCH = master ]]; then
      echo "Please open pull request from a feature / topic branch."
      exit 1;
    fi
  # Verify application version and Git tag match on tagged builds
  - if [[ ! -z "$TRAVIS_TAG" ]]; then
      composer lpv:application-version-guard;
    fi
  - composer lpv:cs-lint
  - if [[ $excludegroup = travis-ci-exclude ]]; then
      composer lpv:test -- --exclude-group travis-ci-exclude;
    fi
  - if [[ $excludegroup = travis-ci-exclude-56 ]]; then
      composer lpv:test -- --exclude-group travis-ci-exclude-56;
    fi

Verify application version on tagged builds
Verify application version on tagged builds
