<commit_before>language: node_js

node_js:
  - "0.12"

services:
  - docker

git:
  depth: 30

sudo:
  false

cache:
  directories:
    - node_modules
    - /tmp/phantomjs

addons:
  firefox: "41.0.1"

before_install:
  # Install CouchDB Stable
  - docker run -d -p 5984:5984 klaemo/couchdb:1.6.1

  # Install CouchDB Master
  - docker run -d -p 15984:5984 klaemo/couchdb:2.0-dev --with-haproxy --with-admin-party-please -n 1



before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"

    # Fail early so we dont run hours of saucelabs if we know there
    # is a lint failure
  - npm run jshint

script: npm run $COMMAND

env:
  global:
  - secure: "<KEY>
  - secure: "<KEY>
  - secure: "<KEY>

  matrix:
  - CLIENT=node COMMAND=test
  - CLIENT=node LEVEL_PREFIX=foo_ COMMAND=test

  # Test against pouchdb-server
  - CLIENT=node SERVER=pouchdb-server COMMAND=test
  - CLIENT=selenium:firefox:41.0.1 SERVER=pouchdb-server COMMAND=test
  - SERVER_ADAPTER=memdown LEVEL_ADAPTER=memdown SERVER=pouchdb-server COMMAND=test

  # Test against pouchdb-express-router
  - CLIENT=node SERVER=pouchdb-express-router COMMAND=test

  # Test in firefox/phantomjs running on travis
  - CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Test auto-compaction in Node, Phantom, and Firefox
  - AUTO_COMPACTION=true CLIENT=node COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Test map/reduce
  - TYPE=mapreduce CLIENT=node COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Testing in saucelabs
  - CLIENT=saucelabs:chrome COMMAND=test
  - CLIENT=saucelabs:safari:6 COMMAND=test
  - CLIENT="saucelabs:internet explorer:10:Windows 8" COMMAND=test
  - CLIENT="saucelabs:internet explorer:10:Windows 8" ADAPTERS=memory COMMAND=test
  - CLIENT="saucelabs:iphone:8.4:OS X 10.11" ADAPTERS=fruitdown GREP=suite2 INVERT=true COMMAND=test
  - CLIENT="saucelabs:iphone:8.4:OS X 10.11" ADAPTERS=fruitdown GREP=suite2 COMMAND=test

  # split up the android+iphone tests as it goes over time
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:iphone:8.1:OS X 10.10" COMMAND=test
  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:iphone:8.1:OS X 10.10" COMMAND=test

  - GREP=suite2 CLIENT="saucelabs:Android:5.1:Linux" COMMAND=test
  - GREP=suite2 INVERT=true CLIENT="saucelabs:Android:5.1:Linux" COMMAND=test

  - CLIENT=selenium:firefox:41.0.1 ADAPTERS=memory COMMAND=test
  - CLIENT=selenium:firefox:41.0.1 ADAPTERS=localstorage COMMAND=test

  # Test CouchDB master (aka bigcouch branch)
  - CLIENT=node SERVER=couchdb-master COMMAND=test
  - SKIP_MIGRATION=true CLIENT=selenium:firefox:41.0.1 SERVER=couchdb-master COMMAND=test

  # Test Couchbase Sync Gateway
  - GREP=test.replication.js CLIENT=node SERVER=sync-gateway BAIL=0 COMMAND=test

  # Performance tests
  - CLIENT=selenium:firefox:41.0.1 PERF=1 COMMAND=test
  - PERF=1 COMMAND=test

  - COMMAND=test-unit
  - COMMAND=test-component
  - COMMAND=test-fuzzy
  - COMMAND=report-coverage
  - COMMAND=verify-bundle-size

matrix:

  allow_failures:
  # Expected failures
  - env: GREP=test.replication.js CLIENT=node SERVER=sync-gateway BAIL=0 COMMAND=test

  # Allowed failures
  - env: CLIENT=node SERVER=couchdb-master COMMAND=test
  - env: SKIP_MIGRATION=true CLIENT=selenium:firefox:41.0.1 SERVER=couchdb-master COMMAND=test
  - env: CLIENT=node SERVER=pouchdb-express-router COMMAND=test
  - env: CLIENT=node SERVER=pouchdb-server COMMAND=test
  - env: CLIENT=selenium:firefox:41.0.1 SERVER=pouchdb-server COMMAND=test
  - env: SERVER_ADAPTER=memdown LEVEL_ADAPTER=memdown SERVER=pouchdb-server COMMAND=test
  - env: COMMAND=report-coverage


  fast_finish: true

  include:
    - node_js: "0.10"
      services: docker
      env: CLIENT=node COMMAND=test
    - node_js: "0.11"
      services: docker<commit_msg>(#4673) - Add phantomjs to allowed failures<commit_after>language: node_js

node_js:
  - "0.12"

services:
  - docker

git:
  depth: 30

sudo:
  false

cache:
  directories:
    - node_modules
    - /tmp/phantomjs

addons:
  firefox: "41.0.1"

before_install:
  # Install CouchDB Stable
  - docker run -d -p 5984:5984 klaemo/couchdb:1.6.1

  # Install CouchDB Master
  - docker run -d -p 15984:5984 klaemo/couchdb:2.0-dev --with-haproxy --with-admin-party-please -n 1

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"

    # Fail early so we dont run hours of saucelabs if we know there
    # is a lint failure
  - npm run jshint

script: npm run $COMMAND

env:
  global:
  - secure: "<KEY>
  - secure: "<KEY>
  - secure: "<KEY>

  matrix:
  - CLIENT=node COMMAND=test
  - CLIENT=node LEVEL_PREFIX=foo_ COMMAND=test

  # Test against pouchdb-server
  - CLIENT=node SERVER=pouchdb-server COMMAND=test
  - CLIENT=selenium:firefox:41.0.1 SERVER=pouchdb-server COMMAND=test
  - SERVER_ADAPTER=memdown LEVEL_ADAPTER=memdown SERVER=pouchdb-server COMMAND=test

  # Test against pouchdb-express-router
  - CLIENT=node SERVER=pouchdb-express-router COMMAND=test

  # Test in firefox/phantomjs running on travis
  - CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Test auto-compaction in Node, Phantom, and Firefox
  - AUTO_COMPACTION=true CLIENT=node COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Test map/reduce
  - TYPE=mapreduce CLIENT=node COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:firefox:41.0.1 COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test

  # Testing in saucelabs
  - CLIENT=saucelabs:chrome COMMAND=test
  - CLIENT=saucelabs:safari:6 COMMAND=test
  - CLIENT="saucelabs:internet explorer:10:Windows 8" COMMAND=test
  - CLIENT="saucelabs:internet explorer:10:Windows 8" ADAPTERS=memory COMMAND=test
  - CLIENT="saucelabs:iphone:8.4:OS X 10.11" ADAPTERS=fruitdown GREP=suite2 INVERT=true COMMAND=test
  - CLIENT="saucelabs:iphone:8.4:OS X 10.11" ADAPTERS=fruitdown GREP=suite2 COMMAND=test

  # split up the android+iphone tests as it goes over time
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:iphone:8.1:OS X 10.10" COMMAND=test
  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:iphone:8.1:OS X 10.10" COMMAND=test

  - GREP=suite2 CLIENT="saucelabs:Android:5.1:Linux" COMMAND=test
  - GREP=suite2 INVERT=true CLIENT="saucelabs:Android:5.1:Linux" COMMAND=test

  - CLIENT=selenium:firefox:41.0.1 ADAPTERS=memory COMMAND=test
  - CLIENT=selenium:firefox:41.0.1 ADAPTERS=localstorage COMMAND=test

  # Test CouchDB master (aka bigcouch branch)
  - CLIENT=node SERVER=couchdb-master COMMAND=test
  - SKIP_MIGRATION=true CLIENT=selenium:firefox:41.0.1 SERVER=couchdb-master COMMAND=test

  # Test Couchbase Sync Gateway
  - GREP=test.replication.js CLIENT=node SERVER=sync-gateway BAIL=0 COMMAND=test

  # Performance tests
  - CLIENT=selenium:firefox:41.0.1 PERF=1 COMMAND=test
  - PERF=1 COMMAND=test

  - COMMAND=test-unit
  - COMMAND=test-component
  - COMMAND=test-fuzzy
  - COMMAND=report-coverage
  - COMMAND=verify-bundle-size

matrix:

  allow_failures:
  # Expected failures
  - env: GREP=test.replication.js CLIENT=node SERVER=sync-gateway BAIL=0 COMMAND=test

  # Allowed failures
  - env: CLIENT=node SERVER=couchdb-master COMMAND=test
  - env: SKIP_MIGRATION=true CLIENT=selenium:firefox:41.0.1 SERVER=couchdb-master COMMAND=test
  - env: CLIENT=node SERVER=pouchdb-express-router COMMAND=test
  - env: CLIENT=node SERVER=pouchdb-server COMMAND=test
  - env: CLIENT=selenium:firefox:41.0.1 SERVER=pouchdb-server COMMAND=test
  - env: SERVER_ADAPTER=memdown LEVEL_ADAPTER=memdown SERVER=pouchdb-server COMMAND=test
  - env: COMMAND=report-coverage
  - env: CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test
  - env: AUTO_COMPACTION=true CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test
  - env: TYPE=mapreduce CLIENT=selenium:phantomjs ES5_SHIM=true COMMAND=test


  fast_finish: true

  include:
    - node_js: "0.10"
      services: docker
      env: CLIENT=node COMMAND=test
    - node_js: "0.11"
      services: docker
{'fraction_non_alphanumeric': 0.10790164717116257, 'fraction_numerical': 0.0316304607304846, 'mean_word_length': 4.4409090909090905, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6287285', 'n_tokens_mistral': 3642, 'n_tokens_neox': 3149, 'n_words': 614}