language: php

php:
  - 7.2
  - 7.3
  - nightly

sudo: false

addons:
  apt:
    packages:
      - libxml2-utils

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

env:
  global:
    - PATH="$HOME/.composer/vendor/bin:$PATH"
    - TARGET=test

stages:
    - lint
    - test

matrix:
  fast_finish: true
  include:
    - stage: lint
      php: 7.3
      env: TARGET=lint
    - stage: lint
      php: 7.3
      env: TARGET=phpstan
    - stage: lint
      php: 7.3
      env: TARGET=checkdeps
    - stage: test
      php: 7.2
      env: COMPOSER_FLAGS="--prefer-lowest"
  allow_failures:
    - php: nightly
    - php: 7.3
      env: TARGET=checkdeps

before_install:
 - wget "https://github.com/php-coveralls/php-coveralls/releases/download/v2.0.0/php-coveralls.phar" --output-document="${HOME}/bin/php-coveralls" && chmod u+x "${HOME}/bin/php-coveralls"
 - gem install yaml-lint

install:
 - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script: make $TARGET

after_success:
 - php-coveralls -v

language: php

php:
  - 7.2
  - 7.3

sudo: false

addons:
  apt:
    packages:
      - libxml2-utils

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

env:
  global:
    - PATH="$HOME/.composer/vendor/bin:$PATH"
    - TARGET=test

stages:
    - lint
    - test

matrix:
  fast_finish: true
  include:
    - stage: lint
      php: 7.3
      env: TARGET=lint
    - stage: lint
      php: 7.3
      env: TARGET=phpstan
    - stage: lint
      php: 7.3
      env: TARGET=checkdeps
    - stage: test
      php: 7.2
      env: COMPOSER_FLAGS="--prefer-lowest"
  allow_failures:
    - php: 7.3
      env: TARGET=checkdeps

before_install:
 - wget "https://github.com/php-coveralls/php-coveralls/releases/download/v2.0.0/php-coveralls.phar" --output-document="${HOME}/bin/php-coveralls" && chmod u+x "${HOME}/bin/php-coveralls"
 - gem install yaml-lint

install:
 - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script: make $TARGET

after_success:
 - php-coveralls -v

Remove nightly build from Travis
[BUILD] Remove nightly build from Travis
