<commit_before>language: php
os: linux

matrix:
  fast_finish: true
  include:
    - name: "PHP 5.6 / MySQL 5.7"
      php: "5.6"
      dist: xenial
    - name: "PHP 7.3 / MySQL 5.7"
      php: "7.3"
      dist: xenial
    # Run composer validate to make sure the composer.json and composer.lock are in sync.
    - name: "composer validate"
      php: "7.2"
      dist: xenial
      before_script: composer install
      script: composer validate
    - name: "code coverage"
      php: "7.3"
      dist: xenial
      script: ./vendor/bin/codecept run install --env travis-ci-hub -f --ext DotReporter; ./vendor/bin/robo code:coverage --ci; cat codeception.dist.yml; bash <(curl -s https://codecov.io/bash) -f tests/_output/coverage.xml

services:
  - mysql
  - elasticsearch
addons:
  chrome: stable

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

env:
  - INSTANCE_URL=http://localhost DATABASE_DRIVER=MYSQL DATABASE_NAME=automated_tests DATABASE_HOST=localhost DATABASE_USER=automated_tests DATABASE_PASSWORD=<PASSWORD> INSTANCE_ADMIN_USER=admin INSTANCE_ADMIN_PASSWORD=<PASSWORD> COMPOSER_MEMORY_LIMIT=-1

before_install:
  # Install chrome driver#
  - whereis google-chrome-stable
  - wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
  - unzip -o chromedriver_linux64.zip
  - ./chromedriver --url-base=/wd/hub &
  # Lint PHP
  - for file in $(git diff --name-status HEAD~1 HEAD | egrep "^[ACMR].*\.php$" | cut -c 3-); do php -l $file; done

install:
  - phpenv config-add travis.php.ini
  - composer self-update && composer --version

before_script:
  # Set up MySQL
  - mysql -e "CREATE DATABASE automated_tests CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
  - mysql -u root -e "CREATE USER 'automated_tests'@'localhost' IDENTIFIED BY 'automated_tests';"
  - mysql -u root -e "GRANT ALL PRIVILEGES ON automated_tests.* TO 'automated_tests'@'localhost';"
  # Install apache - images with PHP 7 or above
  - sudo apt-get update<commit_msg>Fix Travis fails on composer 2<commit_after>language: php
os: linux

matrix:
  fast_finish: true
  include:
    - name: "PHP 5.6 / MySQL 5.7"
      php: "5.6"
      dist: xenial
    - name: "PHP 7.3 / MySQL 5.7"
      php: "7.3"
      dist: xenial
    # Run composer validate to make sure the composer.json and composer.lock are in sync.
    - name: "composer validate"
      php: "7.2"
      dist: xenial
      before_script: composer install
      script: composer validate
    - name: "code coverage"
      php: "7.3"
      dist: xenial
      script: ./vendor/bin/codecept run install --env travis-ci-hub -f --ext DotReporter; ./vendor/bin/robo code:coverage --ci; cat codeception.dist.yml; bash <(curl -s https://codecov.io/bash) -f tests/_output/coverage.xml

services:
  - mysql
  - elasticsearch
addons:
  chrome: stable

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

env:
  - INSTANCE_URL=http://localhost DATABASE_DRIVER=MYSQL DATABASE_NAME=automated_tests DATABASE_HOST=localhost DATABASE_USER=automated_tests DATABASE_PASSWORD=automated_tests INSTANCE_ADMIN_USER=admin INSTANCE_ADMIN_PASSWORD=<PASSWORD>1 COMPOSER_MEMORY_LIMIT=-1

before_install:
  # Install chrome driver#
  - whereis google-chrome-stable
  - wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
  - unzip -o chromedriver_linux64.zip
  - ./chromedriver --url-base=/wd/hub &
  # Lint PHP
  - for file in $(git diff --name-status HEAD~1 HEAD | egrep "^[ACMR].*\.php$" | cut -c 3-); do php -l $file; done

install:
  - phpenv config-add travis.php.ini
  - composer self-update --1 && composer --version

before_script:
  # Set up MySQL
  - mysql -e "CREATE DATABASE automated_tests CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
  - mysql -u root -e "CREATE USER 'automated_tests'@'localhost' IDENTIFIED BY 'automated_tests';"
  - mysql -u root -e "GRANT ALL PRIVILEGES ON automated_tests.* TO 'automated_tests'@'localhost';"
  # Install apache - images with PHP 7 or above
  - sudo apt-get update
{'fraction_non_alphanumeric': 0.11497125718570357, 'fraction_numerical': 0.016245938515371157, 'mean_word_length': 3.252922422954304, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7264062', 'n_tokens_mistral': 1491, 'n_tokens_neox': 1396, 'n_words': 375}