<commit_before>language: php
dist: trusty

matrix:
  include:
    - php: 5.6
      env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
    - php: 7.0
      env: DB=PGSQL PHPUNIT_TEST=1
    - php: 7.1
      env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
    - php: 7.2
      env: DB=MYSQL PHPUNIT_TEST=1

before_script:
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - composer validate
  - composer require silverstripe/installer:4.0.x-dev ezyang/htmlpurifier:* --no-update
  - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
  - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi<commit_msg>Add various recipe versions to Travis build matrix<commit_after>language: php
dist: trusty

matrix:
  include:
    - php: 5.6
      env: DB=MYSQL INSTALLER_VERSION=4.0.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
    - php: 7.0
      env: DB=PGSQL INSTALLER_VERSION=4.1.x-dev PHPUNIT_TEST=1
    - php: 7.1
      env: DB=MYSQL INSTALLER_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1
    - php: 7.2
      env: DB=MYSQL INSTALLER_VERSION=4.x-dev PHPUNIT_TEST=1

before_script:
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - composer validate
  - composer require silverstripe/installer:"$INSTALLER_VERSION" ezyang/htmlpurifier:* --no-update
  - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
  - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
{'fraction_non_alphanumeric': 0.12754491017964073, 'fraction_numerical': 0.023353293413173652, 'mean_word_length': 3.156716417910448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1137092', 'n_tokens_mistral': 647, 'n_tokens_neox': 634, 'n_words': 138}