<commit_before>language: php

sudo: false

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

php:
    - 7.1
    - nightly

services:
    - riak
    - mongodb
    - memcached
    - redis-server

before_install:
    - pecl channel-update pecl.php.net
    - pecl config-set preferred_state beta
    - echo yes | pecl upgrade apcu
    - phpenv config-add ./tests/travis/php.ini
    - if [[ $TRAVIS_PHP_VERSION = '7.1' ]]; then PHPUNIT_FLAGS="--coverage-clover clover.xml"; fi

install:
    - travis_retry composer install

script:
    - ./vendor/bin/phpunit --exclude-group performance $PHPUNIT_FLAGS

after_script:
    - if [[ -f clover.xml ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi

matrix:
    fast_finish: true
    allow_failures:
        - php: nightly<commit_msg>Use new Travis-CI build stages<commit_after>dist: trusty
sudo: false
language: php

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

php:
    - 7.1
    - 7.2
    - nightly

services:
    - riak
    - mongodb
    - memcached
    - redis-server

before_install:
    - pecl channel-update pecl.php.net
    - pecl config-set preferred_state beta
    - echo yes | pecl upgrade apcu
    - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
    - phpenv config-add ./tests/travis/php.ini

install:
    - travis_retry composer install

script: ./vendor/bin/phpunit --exclude-group performance

jobs:
  allow_failures:
    - php: nightly

  include:
    - stage: Coverage
      before_script:
        - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
        - if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
      script:
        - ./vendor/bin/phpunit --exclude-group performance --coverage-clover clover.xml
      after_script:
        - wget https://scrutinizer-ci.com/ocular.phar
        - php ocular.phar code-coverage:upload --format=php-clover clover.xml
{'fraction_non_alphanumeric': 0.12220058422590069, 'fraction_numerical': 0.004381694255111977, 'mean_word_length': 2.4712837837837838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6143806', 'n_tokens_mistral': 734, 'n_tokens_neox': 710, 'n_words': 158}