<commit_before>language: node_js

node_js:
  - "6"

services:
  - docker
  - xvfb

git:
  depth: 30

dist: xenial
sudo: true

addons:
  jwt:
     secure: <KEY>

before_install:
  # Because Saucelabs doesnt proxy 5984 on OSX
  - "if [ -z \"$COUCH_HOST\" ]; then export COUCH_HOST=http://127.0.0.1:3000; fi"

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

# travis_retry will try up to 3 times to run the script. our tests
# are flaky enough (Selenium, SauceLabs, network, etc.) that this
# mitigates a lot of false negatives
script: travis_retry npm run $COMMAND

env:
  global:
  - NPM_CONFIG_PROGRESS="false"
  - SAUCE_USERNAME=pouchdb

  matrix:
  - CLIENT=node COMMAND=test

  # Test in-memory in Node
  - CLIENT=node ADAPTER=memory COMMAND=test

  # Test in firefox running on travis
  - CLIENT=selenium:firefox COMMAND=test
  - CLIENT=selenium:firefox POUCHDB_SRC="../../packages/node_modules/pouchdb/dist/pouchdb.min.js" COMMAND=test

  # Test in chromium running on travis
  - CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test

  # Test auto-compaction in Node and Firefox
  - AUTO_COMPACTION=true CLIENT=node COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:firefox COMMAND=test

  # Test map/reduce
  - TYPE=mapreduce CLIENT=node COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:firefox COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test

  # Test pouchdb-find
  - COUCH_HOST=http://127.0.0.1:3001 TYPE=find PLUGINS=pouchdb-find CLIENT=node SERVER=couchdb-master COMMAND=test
  - TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:firefox SERVER=pouchdb-server COMMAND=test
  - TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser SERVER=pouchdb-server COMMAND=test

  # Testing in saucelabs
  - CLIENT=saucelabs:chrome:70 COMMAND=test
  - SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test

  # Split up the ie test suites (they are faily)
  - GREP=test.basics.js CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test

  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
  - SKIP_MIGRATION=true CLIENT=saucelabs:iphone:11.2 COMMAND=test
  - CLIENT="saucelabs:Android:6.0:Linux" COMMAND=test

  # Test memory
  - CLIENT=selenium:firefox ADAPTERS=memory COMMAND=test

  # Test Webpack bundle
  - CLIENT=selenium:firefox COMMAND=test-webpack

  # Test CouchDB master (aka bigcouch branch)
  - COUCH_HOST=http://127.0.0.1:3001 CLIENT=node SERVER=couchdb-master COMMAND=test
  - COUCH_HOST=http://127.0.0.1:3001 SKIP_MIGRATION=true CLIENT=selenium:firefox SERVER=couchdb-master COMMAND=test

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

  # Test Webpack bundle
  - CLIENT=selenium:firefox NEXT=1 COMMAND=test

  - COMMAND=test-unit
  - COMMAND=test-component
  - COMMAND=test-fuzzy
  - SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find COVERAGE=1 COMMAND=report-coverage
  - COMMAND=verify-build

matrix:
  fast_finish: true
  include:
    - node_js: "8"
      services: docker
      env: CLIENT=node COMMAND=test
    - node_js: "10"
      services: docker
      env: CLIENT=node COMMAND=test
  allow_failures:
    - env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
    - env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
    - env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
    - env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
    - env: SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test
    # xvfb started failing, removing it broke chrome tests
    # https://github.com/pouchdb/pouchdb/issues/7625
    - env: CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
    - env: TYPE=mapreduce CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
    - env: TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser SERVER=pouchdb-server COMMAND=test


branches:
  only:
  - master
  - /^greenkeeper/.*$/

cache:
  directories:
  - $HOME/.npm
  # See https://github.com/gr2m/selsa
  - node_modules/selenium-standalone/.selenium<commit_msg>(#7625) - Add Android to allowed failures<commit_after>language: node_js

node_js:
  - "6"

services:
  - docker
  - xvfb

git:
  depth: 30

dist: xenial
sudo: true

addons:
  jwt:
     secure: <KEY>

before_install:
  # Because Saucelabs doesnt proxy 5984 on OSX
  - "if [ -z \"$COUCH_HOST\" ]; then export COUCH_HOST=http://127.0.0.1:3000; fi"

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

# travis_retry will try up to 3 times to run the script. our tests
# are flaky enough (Selenium, SauceLabs, network, etc.) that this
# mitigates a lot of false negatives
script: travis_retry npm run $COMMAND

env:
  global:
  - NPM_CONFIG_PROGRESS="false"
  - SAUCE_USERNAME=pouchdb

  matrix:
  - CLIENT=node COMMAND=test

  # Test in-memory in Node
  - CLIENT=node ADAPTER=memory COMMAND=test

  # Test in firefox running on travis
  - CLIENT=selenium:firefox COMMAND=test
  - CLIENT=selenium:firefox POUCHDB_SRC="../../packages/node_modules/pouchdb/dist/pouchdb.min.js" COMMAND=test

  # Test in chromium running on travis
  - CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test

  # Test auto-compaction in Node and Firefox
  - AUTO_COMPACTION=true CLIENT=node COMMAND=test
  - AUTO_COMPACTION=true CLIENT=selenium:firefox COMMAND=test

  # Test map/reduce
  - TYPE=mapreduce CLIENT=node COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:firefox COMMAND=test
  - TYPE=mapreduce CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test

  # Test pouchdb-find
  - COUCH_HOST=http://127.0.0.1:3001 TYPE=find PLUGINS=pouchdb-find CLIENT=node SERVER=couchdb-master COMMAND=test
  - TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:firefox SERVER=pouchdb-server COMMAND=test
  - TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser SERVER=pouchdb-server COMMAND=test

  # Testing in saucelabs
  - CLIENT=saucelabs:chrome:70 COMMAND=test
  - SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test

  # Split up the ie test suites (they are faily)
  - GREP=test.basics.js CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test

  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
  - GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
  - GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
  - SKIP_MIGRATION=true CLIENT=saucelabs:iphone:11.2 COMMAND=test
  - CLIENT="saucelabs:Android:6.0:Linux" COMMAND=test

  # Test memory
  - CLIENT=selenium:firefox ADAPTERS=memory COMMAND=test

  # Test Webpack bundle
  - CLIENT=selenium:firefox COMMAND=test-webpack

  # Test CouchDB master (aka bigcouch branch)
  - COUCH_HOST=http://127.0.0.1:3001 CLIENT=node SERVER=couchdb-master COMMAND=test
  - COUCH_HOST=http://127.0.0.1:3001 SKIP_MIGRATION=true CLIENT=selenium:firefox SERVER=couchdb-master COMMAND=test

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

  # Test Webpack bundle
  - CLIENT=selenium:firefox NEXT=1 COMMAND=test

  - COMMAND=test-unit
  - COMMAND=test-component
  - COMMAND=test-fuzzy
  - SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find COVERAGE=1 COMMAND=report-coverage
  - COMMAND=verify-build

matrix:
  fast_finish: true
  include:
    - node_js: "8"
      services: docker
      env: CLIENT=node COMMAND=test
    - node_js: "10"
      services: docker
      env: CLIENT=node COMMAND=test
  allow_failures:
    - env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
    - env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
    - env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
    - env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
    - env: SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test
    # xvfb started failing, removing it broke chrome tests
    # https://github.com/pouchdb/pouchdb/issues/7625
    - env: CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
    - env: TYPE=mapreduce CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
    - env: TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser SERVER=pouchdb-server COMMAND=test
    - env: CLIENT="saucelabs:Android:6.0:Linux" COMMAND=test

branches:
  only:
  - master
  - /^greenkeeper/.*$/

cache:
  directories:
  - $HOME/.npm
  # See https://github.com/gr2m/selsa
  - node_modules/selenium-standalone/.selenium
{'fraction_non_alphanumeric': 0.104437564499484, 'fraction_numerical': 0.02435500515995872, 'mean_word_length': 4.70394349617422, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '6757759', 'n_tokens_mistral': 4043, 'n_tokens_neox': 3517, 'n_words': 703}