<commit_before>language: php
php:
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - nightly
    - hhvm

matrix:
    allow_failures:
        - php: hhvm
        
branches:
    except:
        - gh-pages
        
services:
    - mysql
    - redis-server
    - mongodb

env:
    - DB=mysql
    
cache:
    directories:
        - vendor
        - $HOME/.composer/cache

install:
    - echo $TRAVIS_PHP_VERSION
    - travis_retry composer self-update && composer --version
    - travis_retry composer global require "fxp/composer-asset-plugin:*"
    - |
        if [ $TRAVIS_PHP_VERSION = '7.0' ]; then
            phpenv config-add tests/data/php7.0.ini
            travis_retry composer require "yiisoft/yii2-mongodb:~2.1.0"
        elif [ $TRAVIS_PHP_VERSION = '7.1' ]; then
            phpenv config-add tests/data/php7.0.ini
            travis_retry composer require "yiisoft/yii2-mongodb:~2.1.0"
        fi
    - php -r "echo INTL_ICU_VERSION . \"\n\";"
    - php -r "echo INTL_ICU_DATA_VERSION . \"\n\";"
    - php -v
    - |
        if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then
            php -m
        fi
    - travis_retry composer require "yiisoft/yii2-redis:*"
    - travis_retry composer require "yiisoft/yii2-faker:*"
    - export PATH="$HOME/.composer/vendor/bin/:$PATH"
    - travis_retry composer install --prefer-dist --no-interaction
    
before_script:
    - mysql --version
    - mysql -uroot < tests/data/yii2-base-models.sql
    - |
        if [ $TRAVIS_PHP_VERSION = 'nightly' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        elif [ $TRAVIS_PHP_VERSION = 'hhvm' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        elif [ $TRAVIS_PHP_VERSION = '7.1' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
        elif [ $TRAVIS_PHP_VERSION = '7.0' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
        elif [ $TRAVIS_PHP_VERSION = '5.6' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
        fi
    - redis-cli flushall
    - mongo yii2-base-models --eval "db.addUser(\"user\", \"123456\");"
    - mongo yii2-base-models --eval "db.auth(\"user\", \"123456\");db.entity.drop();db.blameable.drop();db.message.drop();db.notification.drop();db.notification.read.drop();"
        
script: 
    - |<commit_msg>don't support mongodb features about php 5.5 & 5.6 anymore.<commit_after>language: php
php:
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - nightly
    - hhvm

matrix:
    allow_failures:
        - php: hhvm
        
branches:
    except:
        - gh-pages
        
services:
    - mysql
    - redis-server
    - mongodb

env:
    - DB=mysql
    
cache:
    directories:
        - vendor
        - $HOME/.composer/cache

install:
    - echo $TRAVIS_PHP_VERSION
    - travis_retry composer self-update && composer --version
    - travis_retry composer global require "fxp/composer-asset-plugin:*"
    - |
        if [ $TRAVIS_PHP_VERSION = '7.0' ]; then
            phpenv config-add tests/data/php7.0.ini
            travis_retry composer require "yiisoft/yii2-mongodb:~2.1.0"
        elif [ $TRAVIS_PHP_VERSION = '7.1' ]; then
            phpenv config-add tests/data/php7.0.ini
            travis_retry composer require "yiisoft/yii2-mongodb:~2.1.0"
        fi
    - php -r "echo INTL_ICU_VERSION . \"\n\";"
    - php -r "echo INTL_ICU_DATA_VERSION . \"\n\";"
    - php -v
    - |
        if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then
            php -m
        fi
    - travis_retry composer require "yiisoft/yii2-redis:*"
    - travis_retry composer require "yiisoft/yii2-faker:*"
    - export PATH="$HOME/.composer/vendor/bin/:$PATH"
    - travis_retry composer install --prefer-dist --no-interaction
    
before_script:
    - mysql --version
    - mysql -uroot < tests/data/yii2-base-models.sql
    - |
        if [ $TRAVIS_PHP_VERSION = 'nightly' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        elif [ $TRAVIS_PHP_VERSION = 'hhvm' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        elif [ $TRAVIS_PHP_VERSION = '7.1' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
        elif [ $TRAVIS_PHP_VERSION = '7.0' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
        elif [ $TRAVIS_PHP_VERSION = '5.6' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        elif [ $TRAVIS_PHP_VERSION = '5.5' ]; then
            travis_retry wget https://phar.phpunit.de/phpunit.phar
            chmod +x phpunit.phar
            EXCLUDE_FLAGS="--exclude-group mongo"
        fi
    - redis-cli flushall
    - mongo yii2-base-models --eval "db.addUser(\"user\", \"123456\");"
    - mongo yii2-base-models --eval "db.auth(\"user\", \"123456\");db.entity.drop();db.blameable.drop();db.message.drop();db.notification.drop();db.notification.read.drop();"
        
script: 
    - |
{'fraction_non_alphanumeric': 0.13124354116431278, 'fraction_numerical': 0.01722356183258698, 'mean_word_length': 1.9387651821862348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '283286', 'n_tokens_mistral': 2140, 'n_tokens_neox': 2091, 'n_words': 366}