<commit_before>sudo: false
language: php
php:
  - 5.6

cache:
  directories:
    - $HOME/.cache/bower
    - $HOME/.composer/cache
    - $HOME/.npm
    - /tmp/phantomjs

env:
  global:
    - TEST_DAV=$(tests/travis/changed_app.sh dav)
    - TC=litmus-v2
    - SRV_HOST_NAME=owncloud
    - SRV_HOST_PORT=8889
  matrix:
    - DB=sqlite

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

addons:
  apt: &common_apt
    packages:
    - realpath
    - net-tools
  hosts: &common_hosts
    - owncloud

before_install:
  - if [ "$TC" = "syntax" ] || [ "$TEST_DAV" = "1" ] || { [ "$TC" = "selenium" ] && [ ! -z "$SAUCE_USERNAME" ] && [ ! -z "$SAUCE_ACCESS_KEY" ] && { [ "$CRON_ONLY" = "0" ] || [ "$TRAVIS_EVENT_TYPE" = "cron" ]; }; }; then echo "There is real work to do"; else exit 0; fi
  - make
  - sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/before_install.sh $DB; fi"

install:
  - sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/install.sh $DB; fi"
  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/install.sh; fi"

before_script:
  - sh -c "if [ '$TC' = 'selenium' ]; then bash tests/travis/start_php_dev_server.sh; fi"

script:
  - sh -c "if [ '$TC' = 'syntax' ]; then make test-php-lint ; fi"
  - sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
  - sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"

  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/script.sh; fi"
  - sh -c "if [ '$TC' = 'selenium' ]; then bash tests/travis/start_behat_tests.sh; fi"

matrix:
  include:
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="latest" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=0
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="firefox" BROWSER_VERSION="47.0" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=0
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="internet explorer" BROWSER_VERSION="11.0" PLATFORM="Windows 7" TEST_DAV=0 CRON_ONLY=0
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=litmus-v1
    - php: 5.6
      env: DB=sqlite TC=carddav
    - php: 5.6
      env: DB=sqlite TC=caldav
    - php: 5.6
      env: DB=sqlite TC=caldav-old-endpoint
    - php: 5.6
      env: DB=sqlite TC=carddav-old-endpoint
    - php: 5.6
      env: DB=sqlite TC=syntax TEST_DAV=0
    - php: 7.0
      env: DB=sqlite TC=syntax TEST_DAV=0
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="latest-1" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="26" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="48.0" PLATFORM=Linux TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="firefox" BROWSER_VERSION="14.0" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true

  fast_finish: true
<commit_msg>run IE UI-tests on cron jobs only and not on every PR<commit_after>sudo: false
language: php
php:
  - 5.6

cache:
  directories:
    - $HOME/.cache/bower
    - $HOME/.composer/cache
    - $HOME/.npm
    - /tmp/phantomjs

env:
  global:
    - TEST_DAV=$(tests/travis/changed_app.sh dav)
    - TC=litmus-v2
    - SRV_HOST_NAME=owncloud
    - SRV_HOST_PORT=8889
  matrix:
    - DB=sqlite

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

addons:
  apt: &common_apt
    packages:
    - realpath
    - net-tools
  hosts: &common_hosts
    - owncloud

before_install:
  - if [ "$TC" = "syntax" ] || [ "$TEST_DAV" = "1" ] || { [ "$TC" = "selenium" ] && [ ! -z "$SAUCE_USERNAME" ] && [ ! -z "$SAUCE_ACCESS_KEY" ] && { [ "$CRON_ONLY" = "0" ] || [ "$TRAVIS_EVENT_TYPE" = "cron" ]; }; }; then echo "There is real work to do"; else exit 0; fi
  - make
  - sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/before_install.sh $DB; fi"

install:
  - sh -c "if [ '$TEST_DAV' = '1' ] || [ '$TC' = 'selenium' ]; then bash tests/travis/install.sh $DB; fi"
  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/install.sh; fi"

before_script:
  - sh -c "if [ '$TC' = 'selenium' ]; then bash tests/travis/start_php_dev_server.sh; fi"

script:
  - sh -c "if [ '$TC' = 'syntax' ]; then make test-php-lint ; fi"
  - sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
  - sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"

  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/script.sh; fi"
  - sh -c "if [ '$TC' = 'selenium' ]; then bash tests/travis/start_behat_tests.sh; fi"

matrix:
  include:
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="latest" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=0
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="firefox" BROWSER_VERSION="47.0" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=0
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=litmus-v1
    - php: 5.6
      env: DB=sqlite TC=carddav
    - php: 5.6
      env: DB=sqlite TC=caldav
    - php: 5.6
      env: DB=sqlite TC=caldav-old-endpoint
    - php: 5.6
      env: DB=sqlite TC=carddav-old-endpoint
    - php: 5.6
      env: DB=sqlite TC=syntax TEST_DAV=0
    - php: 7.0
      env: DB=sqlite TC=syntax TEST_DAV=0
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="latest-1" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="26" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="chrome" BROWSER_VERSION="48.0" PLATFORM=Linux TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="firefox" BROWSER_VERSION="14.0" PLATFORM="Windows 10" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true
    - php: 5.6
      env: DB=pgsql TC=selenium BROWSER="internet explorer" BROWSER_VERSION="11.0" PLATFORM="Windows 7" TEST_DAV=0 CRON_ONLY=1
      addons:
        apt: *common_apt
        hosts: *common_hosts
        sauce_connect: true

  fast_finish: true

{'fraction_non_alphanumeric': 0.15230433596945733, 'fraction_numerical': 0.023725115898554677, 'mean_word_length': 2.5797950219619326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6361017', 'n_tokens_mistral': 3151, 'n_tokens_neox': 2943, 'n_words': 657}