language: php
os: linux

jobs:
  fast_finish: true
  include:
    - php: 5.4
      dist: trusty
    - php: 5.5
      dist: trusty
    - php: 5.6
    - php: 7.0
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 7.4
    - php: nightly
  allow_failures:
    - php: 7.4
    - php: nightly

addons:
  apt:
    update: true
    packages:
      - libsodium-dev
      - uuid-dev

before_install:
  - yes '' | pecl install -f libsodium-1.0.7
  - yes '' | pecl install -f uuid-1.0.4
  - travis_retry composer self-update

install:
  - travis_retry composer require --no-update "php-coveralls/php-coveralls:^1 | ^2"
  - travis_retry composer install --no-interaction --prefer-dist --no-progress --no-suggest

before_script:
  - mkdir -p build/logs

script:
  - travis_wait composer run-script --timeout=1200 test-ci

after_success:
  - travis_retry ./resources/scripts/php-coveralls.sh
