<commit_before>sudo: false
language: node_js
node_js:
  # dropping support for node 0.10 - "0.10"
  # dropping support for node 0.12 - "0.12"
  # dropping support for node 4
  - "6"
  # dropped - "7"
  - "8"
  - "9"
  - "10"

os:
  - linux
  - osx

matrix:
  allow_failures:
    - os: osx

before_install:
  # make sure we have enough ephemeral port on MacOS
  # https://superuser.com/questions/145989/does-mac-os-x-throttle-the-rate-of-socket-creation
  # https://superuser.com/a/443168
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
       sudo ulimit -a;
       sudo sysctl net.inet.ip.portrange.first net.inet.ip.portrange.hifirst net.inet.ip.portrange.last net.inet.ip.portrange.hilast;
       sudo sysctl -w net.inet.ip.portrange.first=32768;
       sudo sysctl -w net.inet.ip.portrange.hifirst=32768;
       sudo sysctl -w net.inet.tcp.msl=1000;
       sudo sysctl kern.maxfiles;
       sysctl kern.maxfilesperproc;
       echo " setting new limits";
       sudo sysctl -w kern.maxfiles=50000;
       sudo sysctl -w kern.maxfilesperproc=20000;
       sudo serverinfo --setperfmode true;
       sudo ulimit -c unlimited;
       sudo ulimit -S n 1024;
       sudo ulimit -Sl unlimited;
       sudo ulimit -a;
    fi;
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
      brew install libressl;
      export PATH=/usr/local/opt/libressl/bin:$PATH;
    fi;
  - openssl version

before_script:
  - npm install -g mocha
  - if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
      if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
         npm install -g istanbul coveralls;
         npm install -g codeclimate-test-reporter;
      fi;
    fi;

  # memcpy only works with node version > 0.8 and <= 0.12, and not with io.js, at this time
  - if [[ `node --version` == v0.12 ]]; then npm i memcpy ; fi
  - if [[ `node --version` == v0.10* ]]; then npm i ursa@0.8.5 ; fi

after_success:
  # only run code coverage on linux and latest nodejs version
  - if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
      if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
         make test-cov;
      fi;
    fi;

script:
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then;
       npm run testlerna;
    else;
       npm test;
    fi;

addons:
  code_climate:
    repo_token: <KEY>



notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/4d51130aaea652dbc8f1
    on_success: always  # options: [always|never|change] default: always
    on_failure: always  # options: [always|never|change] default: always
    on_start: true     # default: false
<commit_msg>change test strategy on MacOS,<commit_after>sudo: false
language: node_js
node_js:
  # dropping support for node 0.10 - "0.10"
  # dropping support for node 0.12 - "0.12"
  # dropping support for node 4
  - "6"
  # dropped - "7"
  - "8"
  - "9"
  - "10"

os:
  - linux
  - osx

matrix:
  allow_failures:
    - os: osx

before_install:
  # make sure we have enough ephemeral port on MacOS
  # https://superuser.com/questions/145989/does-mac-os-x-throttle-the-rate-of-socket-creation
  # https://superuser.com/a/443168
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
       sudo ulimit -a;
       sudo sysctl net.inet.ip.portrange.first net.inet.ip.portrange.hifirst net.inet.ip.portrange.last net.inet.ip.portrange.hilast;
       sudo sysctl -w net.inet.ip.portrange.first=32768;
       sudo sysctl -w net.inet.ip.portrange.hifirst=32768;
       sudo sysctl -w net.inet.tcp.msl=1000;
       sudo sysctl kern.maxfiles;
       sysctl kern.maxfilesperproc;
       echo " setting new limits";
       sudo sysctl -w kern.maxfiles=50000;
       sudo sysctl -w kern.maxfilesperproc=20000;
       sudo serverinfo --setperfmode true;
       sudo ulimit -c unlimited;
       sudo ulimit -S n 1024;
       sudo ulimit -Sl unlimited;
       sudo ulimit -a;
    fi;
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]]; then
      brew install libressl;
      export PATH=/usr/local/opt/libressl/bin:$PATH;
    fi;
  - openssl version

before_script:
  - npm install -g mocha
  - if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
      if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
         npm install -g istanbul coveralls;
         npm install -g codeclimate-test-reporter;
      fi;
    fi;

  # memcpy only works with node version > 0.8 and <= 0.12, and not with io.js, at this time
  - if [[ `node --version` == v0.12 ]]; then npm i memcpy ; fi
  - if [[ `node --version` == v0.10* ]]; then npm i ursa@0.8.5 ; fi

after_success:
  # only run code coverage on linux and latest nodejs version
  - if [[ $TRAVIS_OS_NAME =~ ^linux$ ]]; then
      if [[ $TRAVIS_NODE_VERSION =~ ^10$ ]]; then
         make test-cov;
      fi;
    fi;

script:
  - if [[ $TRAVIS_OS_NAME =~ ^osx$ ]];
    then  npm run testlerna;
    else  npm test;
    fi

addons:
  code_climate:
    repo_token: <KEY>



notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/4d51130aaea652dbc8f1
    on_success: always  # options: [always|never|change] default: always
    on_failure: always  # options: [always|never|change] default: always
    on_start: true     # default: false

{'fraction_non_alphanumeric': 0.12638668779714737, 'fraction_numerical': 0.03486529318541997, 'mean_word_length': 2.489288182446441, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '557228', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1863, 'n_words': 482}