<commit_before>language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

env:
  global:
    - CORE_BRANCH=stable8.1
    - APP_NAME=galleryplus
    # Codacy credentials
    - secure: "<KEY>
    # Code Climate credentials
    - secure: "<KEY>/RdwihZMET4m1fxfsryW3eprz6ddJ6bpUf8="
  matrix:
    - DB=sqlite

branches:
  only:
    - master

before_install:
  - composer self-update
  - composer install --prefer-source --no-interaction
  - composer require phpunit/phpcov:*
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  - cd ../core
  - php occ app:enable $APP_NAME

script:
  # Test lint
  - cd apps/$APP_NAME
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.4' ]; then find . -name \*.php -print0 | xargs -0 -n 1 -P 4 php -l; fi"
  - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then find . -name \*.php -exec php -l "{}" \;; fi"

  # Run phpunit tests
  - phpunit -c phpunit.xml
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7' ]; then phpunit -c phpunit.integration.xml; fi;"

  # Merge clover reports
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php vendor/bin/phpcov merge --clover build/logs/clover.xml tests; fi;"

  # Create coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi"

after_script:
  # Codacy coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php vendor/bin/codacycoverage clover; fi;"
  # Codeclimate coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php vendor/bin/test-reporter; fi;"

matrix:
  include:
    - php: 5.4
      env: DB=mysql
    - php: 5.4
      env: DB=pgsql
  allow_failures:
    - php: hhvm
    - php: 7
  fast_finish: true
<commit_msg>Also disable report merging on PHP 7.0 (cherry picked from commit 1491ce3)<commit_after>language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

env:
  global:
    - CORE_BRANCH=stable8.1
    - APP_NAME=galleryplus
    # Codacy credentials
    - secure: "<KEY>
    # Code Climate credentials
    - secure: "<KEY>
  matrix:
    - DB=sqlite

branches:
  only:
    - master

before_install:
  - composer self-update
  - composer install --prefer-source --no-interaction
  - composer require phpunit/phpcov:*
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  - cd ../core
  - php occ app:enable $APP_NAME

script:
  # Test lint
  - cd apps/$APP_NAME
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.4' ]; then find . -name \*.php -print0 | xargs -0 -n 1 -P 4 php -l; fi"
  - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then find . -name \*.php -exec php -l "{}" \;; fi"

  # Run phpunit tests
  - phpunit -c phpunit.xml
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != '7' ]; then phpunit -c phpunit.integration.xml; fi;"

  # Merge clover reports
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then php vendor/bin/phpcov merge --clover build/logs/clover.xml tests; fi;"

  # Create coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi"

after_script:
  # Codacy coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php vendor/bin/codacycoverage clover; fi;"
  # Codeclimate coverage report
  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php vendor/bin/test-reporter; fi;"

matrix:
  include:
    - php: 5.4
      env: DB=mysql
    - php: 5.4
      env: DB=pgsql
  allow_failures:
    - php: hhvm
    - php: 7
  fast_finish: true

{'fraction_non_alphanumeric': 0.15246067985794012, 'fraction_numerical': 0.015220700152207, 'mean_word_length': 2.7768199233716473, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '1111136', 'n_tokens_mistral': 1619, 'n_tokens_neox': 1528, 'n_words': 383}