language: php
php:
    - 7.1
    - 7.2

env:
    matrix:
        - dependencies=""
        - dependencies="--prefer-stable"

matrix:
    include:
        - php: 7.1
          env: dependencies="--prefer-lowest --prefer-stable"
    allow_failures:
        - php: 7.2

before_install:
    - composer self-update

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

script:
    - vendor/bin/parallel-lint -e php,phpt --exclude tests/temp src tests
    - vendor/bin/phpcs --standard=vendor/nepada/coding-standard/src/Nepada/ruleset.xml --encoding=utf-8 -sp src tests
    - vendor/bin/phpstan analyse -c tests/phpstan.neon -l 7 src tests
    - vendor/bin/tester -s -p php -c tests/php.ini tests

after_failure:
    - for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

sudo: false

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

language: php
php:
    - 7.1
    - 7.2

env:
    - COMPOSER_ARGS=""
    - COMPOSER_ARGS="--prefer-stable"
    - COMPOSER_ARGS="--prefer-stable --prefer-lowest"

matrix:
    allow_failures:
        - php: 7.2

before_install:
    - composer self-update

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

script:
    - vendor/bin/parallel-lint -e php,phpt --exclude tests/temp src tests
    - vendor/bin/phpcs --standard=vendor/nepada/coding-standard/src/Nepada/ruleset.xml --encoding=utf-8 -sp src tests
    - vendor/bin/phpstan analyse -c tests/phpstan.neon -l 7 src tests
    - vendor/bin/tester -s -p php -c tests/php.ini tests

after_failure:
    - for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

sudo: false

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

Test with lowest dependencies for every PHP version
Test with lowest dependencies for every PHP version
