<commit_before>language: php

env:
  global:
    - DB=MYSQL
    - CORE_RELEASE=master
    - COMPOSER_ROOT_VERSION=1.0.x-dev
    - DISPLAY=":99"
    - XVFBARGS=":99 -ac -screen 0 1024x768x16"

matrix:
  include:
    - php: 5.6
      env: PHPUNIT_TEST=1
    - php: 5.6
      env: BEHAT_TEST=1
    - php: 7.0
      env: PHPUNIT_TEST=1
    - php: 5.6
      env: NPM_TEST=1
    - php: 5.6
      env: PHPCS_TEST=1

before_script:
  - printf "\n" | pecl install imagick
  - composer self-update || true
  - "if [ \"$PHPCS_TEST\" = \"1\" ]; then pyrus install pear/PHP_CodeSniffer; fi"
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
  - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
  - cd ~/builds/ss
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then mkdir asset-admin/artifacts; fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then sh -e /etc/init.d/xvfb start; sleep 3; fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then (vendor/bin/selenium-server-standalone > asset-admin/artifacts/selenium.log 2>&1 &); fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then (vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php &> asset-admin/artifacts/serve.log &); fi"

script:
  - "if [ \"$PHPUNIT_TEST\" = \"1\" ]; then vendor/bin/phpunit asset-admin/tests/php; fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (nvm install 6 && npm install -g yarn); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd framework && nvm use 6 && yarn install --network-concurrency 1 ); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn install --network-concurrency 1 ); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn run test); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn run lint); fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat @asset-admin --config=./asset-admin/behat.yml; fi"
  - "if [ \"$PHPCS_TEST\" = \"1\" ]; then phpcs --standard=asset-admin/tests/phpcs/ruleset.xml asset-admin/code/ asset-admin/tests/; fi"

after_failure:
  - php ./framework/tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./asset-admin/artifacts/

notifications:
  slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ<commit_msg>Remove composer self-update, handled by Travis now<commit_after>language: php

env:
  global:
    - DB=MYSQL
    - CORE_RELEASE=master
    - COMPOSER_ROOT_VERSION=1.0.x-dev
    - DISPLAY=":99"
    - XVFBARGS=":99 -ac -screen 0 1024x768x16"

matrix:
  include:
    - php: 5.6
      env: PHPUNIT_TEST=1
    - php: 5.6
      env: BEHAT_TEST=1
    - php: 7.0
      env: PHPUNIT_TEST=1
    - php: 5.6
      env: NPM_TEST=1
    - php: 5.6
      env: PHPCS_TEST=1

before_script:
  - printf "\n" | pecl install imagick
  - "if [ \"$PHPCS_TEST\" = \"1\" ]; then pyrus install pear/PHP_CodeSniffer; fi"
  - phpenv rehash
  - phpenv config-rm xdebug.ini
  - echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
  - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
  - cd ~/builds/ss
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then mkdir asset-admin/artifacts; fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then sh -e /etc/init.d/xvfb start; sleep 3; fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then (vendor/bin/selenium-server-standalone > asset-admin/artifacts/selenium.log 2>&1 &); fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then (vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php &> asset-admin/artifacts/serve.log &); fi"

script:
  - "if [ \"$PHPUNIT_TEST\" = \"1\" ]; then vendor/bin/phpunit asset-admin/tests/php; fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (nvm install 6 && npm install -g yarn); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd framework && nvm use 6 && yarn install --network-concurrency 1 ); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn install --network-concurrency 1 ); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn run test); fi"
  - "if [ \"$NPM_TEST\" = \"1\" ]; then (cd asset-admin && nvm use 6 && yarn run lint); fi"
  - "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat @asset-admin --config=./asset-admin/behat.yml; fi"
  - "if [ \"$PHPCS_TEST\" = \"1\" ]; then phpcs --standard=asset-admin/tests/phpcs/ruleset.xml asset-admin/code/ asset-admin/tests/; fi"

after_failure:
  - php ./framework/tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./asset-admin/artifacts/

notifications:
  slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ
{'fraction_non_alphanumeric': 0.1911484166348722, 'fraction_numerical': 0.022128958412819536, 'mean_word_length': 2.9569811320754718, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3453965', 'n_tokens_mistral': 2202, 'n_tokens_neox': 2128, 'n_words': 430}