<commit_before>language: php

dist: xenial

services:
  - memcached
  - redis-server
  - postgresql
  - mysql

addons:
  postgresql: '9.6'

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

php:
  - 7.4

env:
  matrix:
    - DB=sqlite DB_URL='sqlite:///:memory:'
    - DB=mysql DB_URL='mysql://root@127.0.0.1/cakephp_test'
    - DB=pgsql DB_URL='postgres://postgres@127.0.0.1/cakephp_test'

matrix:
  include:
    - php: 7.2
      env: PREFER_LOWEST=1

before_install:
  - echo cakephp version && tail -1 VERSION.txt

  - if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test CHARACTER SET utf8mb4;'; fi
  - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi

  - |
      if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then
        pecl channel-update pecl.php.net
        pecl install pcov
      fi

  - |
      phpenv config-rm xdebug.ini
      if [[ $TRAVIS_PHP_VERSION != 'nightly' ]]; then
        echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
        echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
        echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
        echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
      fi

  - sudo locale-gen da_DK.UTF-8

install:
  - |
      if [[ $PREFER_LOWEST == 1 ]]; then
        composer update --prefer-lowest --prefer-stable --no-interaction
      elif [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then
        composer install --no-interaction --ignore-platform-reqs
      else
        composer install --no-interaction
      fi

script:
  - |
      if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then
        export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=clover.xml
      else
        vendor/bin/phpunit
      fi

after_success:
  - if [[ $TRAVIS_PHP_VERSION == '7.4' ]]; then bash <(curl -s https://codecov.io/bash); fi

notifications:
  email: false<commit_msg>Reduce travis config down to PREFER_LOWEST only<commit_after>language: php

dist: xenial

services:
  - memcached
  - redis-server

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

matrix:
  include:
    - php: 7.2
      env: PREFER_LOWEST=1 DB=sqlite DB_URL='sqlite:///:memory:'

before_install:
  - echo cakephp version && tail -1 VERSION.txt

  - |
      phpenv config-rm xdebug.ini
      echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
      echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
      echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
      echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

  - sudo locale-gen da_DK.UTF-8

install:
  - |
      if [[ $PREFER_LOWEST == 1 ]]; then
        composer update --prefer-lowest --prefer-stable --no-interaction
      else
        composer install --no-interaction
      fi

script:
  - vendor/bin/phpunit

notifications:
  email: false
{'fraction_non_alphanumeric': 0.14965764590805347, 'fraction_numerical': 0.012716009129442452, 'mean_word_length': 2.5591647331786542, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 19, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 2, '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': '4384380', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1134, 'n_words': 232}