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

env:
  global:
    - CORE_BRANCH=master
    - secure: <KEY>
    - secure: <KEY>
  matrix:
    - DB=sqlite

branches:
  only:
    - master
    - /^stable\d+(\.\d+)?$/

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

before_install:
  - composer self-update
  - composer install
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh mail $CORE_BRANCH $DB
  - cd ../core
  - php occ app:enable mail
  - npm install -g npm@latest

before_script:
  - cd apps/mail
  - npm install --deps
  - npm run-script bower_deps

script:
  # Test lint
  - find . -name \*.php -not -path './vendor/*' -exec php -l "{}" \;

  # Run js unit tests
  - grunt

  # Run phpunit tests
  - cd tests
  - phpunit --configuration phpunit.xml

  # 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 clover.xml; fi"
matrix:
  include:
    - php: 5.4
      env: DB=mysql
    - php: 5.4
      env: DB=pgsql
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable8"
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable8.1"
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable7"

  allow_failures:
    - php: hhvm
    - php: 7
  fast_finish: true<commit_msg>run CI js tests only once<commit_after>sudo: false
language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

env:
  global:
    - CORE_BRANCH=master
    - TEST_JS=FALSE
    - secure: <KEY>
    - secure: <KEY>
  matrix:
    - DB=sqlite

branches:
  only:
    - master
    - /^stable\d+(\.\d+)?$/

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

before_install:
  - composer self-update
  - composer install
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh mail $CORE_BRANCH $DB
  - cd ../core
  - php occ app:enable mail
  - sh -c "if [ '$TEST_JS' = 'TRUE' ]; then npm install -g npm@latest; fi"

before_script:
  - cd apps/mail
  - sh -c "if [ '$TEST_JS' = 'TRUE' ]; then npm install --deps; fi"
  - sh -c "if [ '$TEST_JS' = 'TRUE' ]; then npm run-script bower_deps; fi"

script:
  # Test lint
  - find . -name \*.php -not -path './vendor/*' -exec php -l "{}" \;

  # Run js unit tests
  - sh -c "if [ '$TEST_JS' = 'TRUE' ]; then grunt; fi"

  # Run phpunit tests
  - cd tests
  - phpunit --configuration phpunit.xml

  # 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 clover.xml; fi"
matrix:
  include:
    - php: 5.4
      env: "DB=mysql TEST_JS=TRUE"
    - php: 5.4
      env: DB=pgsql
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable8"
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable8.1"
    - php: 5.4
      env: "DB=mysql CORE_BRANCH=stable7"

  allow_failures:
    - php: hhvm
    - php: 7
  fast_finish: true
{'fraction_non_alphanumeric': 0.15363553392150897, 'fraction_numerical': 0.013386066321874049, 'mean_word_length': 2.2945891783567136, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '3127762', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1310, 'n_words': 314}