<commit_before>language: php

env:
  global:
    - COMPOSER_ROOT_VERSION=2.x-dev

addons:
  apt:
    packages:
      - hunspell
      - libhunspell-dev
      - hunspell-en-us

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

before_script:
  # Init PHP
  - phpenv rehash
  - phpenv config-rm xdebug.ini

  # Install composer dependencies
  - composer validate
  - 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
  - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
  - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi

after_success:
  - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
  <commit_msg>FIX phpcs line in Travis configuration not to look for non-existent PHP files<commit_after>language: php

env:
  global:
    - COMPOSER_ROOT_VERSION=2.x-dev

addons:
  apt:
    packages:
      - hunspell
      - libhunspell-dev
      - hunspell-en-us

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

before_script:
  # Init PHP
  - phpenv rehash
  - phpenv config-rm xdebug.ini

  # Install composer dependencies
  - composer validate
  - 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
  - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
  - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi

after_success:
  - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
{'fraction_non_alphanumeric': 0.12877178070548237, 'fraction_numerical': 0.013599660008499787, 'mean_word_length': 2.7664, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5721629', 'n_tokens_mistral': 914, 'n_tokens_neox': 892, 'n_words': 209}