<commit_before>language: generic

env:
  global:
    # `match` keychain info – the values don't matter, they're defined
    # here so they're consistent throughout
    - MATCH_KEYCHAIN_NAME=travis-ios-keychain
    - MATCH_KEYCHAIN_PASSWORD=<PASSWORD>
    # dirty hack for https://github.com/travis-ci/travis-ci/issues/5092
    - PATH=${PATH/\.\/node_modules\/\.bin/}
    # variables that are used later on
    - TRAVIS_NODE_VERSION=8
    - PUSH_BRANCH=0
    - CAN_DEPLOY=0
    - USE_EMULATOR=no
    - run_deploy=0

matrix:
  fast_finish: true
  include:
    - os: linux
      dist: trusty
      sudo: false
      language: node_js
      node_js: '8'
      env: [JS=yes, CAN_DEPLOY=yes]

    - &android-base
      os: linux
      dist: precise
      sudo: required
      language: android
      jdk: oraclejdk8
      env: [ANDROID=yes, CAN_DEPLOY=yes]
      android:
        components:
          - tools
          - platform-tools
          - build-tools-23.0.1
          - build-tools-23.0.2
          - build-tools-25.0.1
          - build-tools-23.0.3
          - build-tools-25.0.2
          - build-tools-25.0.3
          - build-tools-26.0.1
          - android-23
          - android-25
          - android-26
          - extra-android-m2repository
          - extra-google-m2repository

    # - <<: *android-base
    #   env: [ANDROID=yes, USE_EMULATOR=yes]
    #   android:
    #     components:
    #       - tools
    #       - platform-tools
    #       - build-tools-23.0.1
    #       - android-23
    #       - extra-android-m2repository
    #       - extra-google-m2repository
    #       - sys-img-armeabi-v7a-google_apis-23

    - os: osx
      language: objective-c
      osx_image: xcode8.3
      node_js: '8'
      env: [IOS=yes, CAN_DEPLOY=yes]


# As seen in http://stackoverflow.com/a/31882307/2347774
# Prevent travis from building twice for PRs
branches:
  only:
    - master
    - /^travis/
    - /^v?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?$/


before_install:
  - echo "Now testing on $TRAVIS_OS_NAME"
  - echo "Using the android emulator? $USE_EMULATOR"
  - echo "Travis branch is $TRAVIS_BRANCH"
  - echo "Travis is in pull request $TRAVIS_PULL_REQUEST"
  - echo "Build triggered by $TRAVIS_EVENT_TYPE"
  - echo "Using node $TRAVIS_NODE_VERSION (node -v says $(node -v)"

  # make sure to use ruby 2.4
  - rvm use ruby-2.4.1 --install --binary --create
  - gem install bundler

  # only deploy from:
  # - cron-triggered jobs
  # - tagged commits
  # - commits whose messages contain the string [ci run beta]
  - if [[ $CAN_DEPLOY = yes && (
      $TRAVIS_EVENT_TYPE == "cron" ||
      $TRAVIS_TAG != "" ||
      $TRAVIS_COMMIT_MESSAGE == *"[ci run beta]"*
    ) ]]; then run_deploy=1; fi

  # force a consistent node version on android
  - if [[ $ANDROID ]]; then
      nvm install "$TRAVIS_NODE_VERSION";
      nvm use "$TRAVIS_NODE_VERSION";
    fi

  # turn off fancy npm stuff
  - npm config set spin=false
  - npm config set progress=false

  - npm install -g npm@5
  - if [[ $JS ]]; then npm install -g greenkeeper-lockfile@1; fi

install:
  # install packages (if the first fails, try once more)
  - npm install || npm install

  # install fastlane (if at first you don't succeed, try once more)
  - bundle install || bundle install

  - if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew install imagemagick; fi

before_script:
  - if [[ $JS ]]; then greenkeeper-lockfile-update; fi
  # Fire up the Android emulator
  - if [[ $ANDROID && $USE_EMULATOR = yes ]]; then
      bundle exec fastlane android ci-emulator;
    fi

script:
  # ensure the env file exists and fill it out
  - touch .env.js
  - echo "export const GOOGLE_CALENDAR_API_KEY = '$GCAL_KEY'" >> .env.js
  - echo "export const GOOGLE_MAPS_API_KEY = '$GMAPS_KEY'" >> .env.js

  # disable npm wrapper for npm scripts
  - echo "loglevel=silent" >> .npmrc

  # ensure the log directory exists for danger
  - mkdir -p logs/

  # run the platform-specific "script" sections
  - if [[ $JS ]]; then bash scripts/travis/script-js.sh; fi
  - if [[ $IOS ]]; then bundle exec fastlane ios ci-run; fi
  - if [[ $ANDROID ]]; then bundle exec fastlane android ci-run; fi

  # we run `danger` out here to ensure that it is run,
  # even if another task in script.sh fails.
  - if [[ $JS ]]; then npm run danger; fi

after_success:
  - bash scripts/travis/after_success.sh

deploy:
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_PAGES_TOKEN
    local_dir: docs/
    on:
      branch: master
      condition: $JS

before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
  - rm -rf $TMPDIR/jest_preprocess_cache

cache:
  bundler: true
  directories:
    - node_modules
    - $HOME/.gradle
    - $HOME/.gradle/wrapper/
    - $HOME/.android/build-cache

notifications:
  webhooks:
    # trigger Buildtime Trend Service to parse Travis CI log
    - https://stormy-cliffs-59913.herokuapp.com/travis
<commit_msg>remove node_modules from cache<commit_after>language: generic

env:
  global:
    # `match` keychain info – the values don't matter, they're defined
    # here so they're consistent throughout
    - MATCH_KEYCHAIN_NAME=travis-ios-keychain
    - MATCH_KEYCHAIN_PASSWORD=<PASSWORD>
    # dirty hack for https://github.com/travis-ci/travis-ci/issues/5092
    - PATH=${PATH/\.\/node_modules\/\.bin/}
    # variables that are used later on
    - TRAVIS_NODE_VERSION=8
    - PUSH_BRANCH=0
    - CAN_DEPLOY=0
    - USE_EMULATOR=no
    - run_deploy=0

matrix:
  fast_finish: true
  include:
    - os: linux
      dist: trusty
      sudo: false
      language: node_js
      node_js: '8'
      env: [JS=yes, CAN_DEPLOY=yes]

    - &android-base
      os: linux
      dist: precise
      sudo: required
      language: android
      jdk: oraclejdk8
      env: [ANDROID=yes, CAN_DEPLOY=yes]
      android:
        components:
          - tools
          - platform-tools
          - build-tools-23.0.1
          - build-tools-23.0.2
          - build-tools-25.0.1
          - build-tools-23.0.3
          - build-tools-25.0.2
          - build-tools-25.0.3
          - build-tools-26.0.1
          - android-23
          - android-25
          - android-26
          - extra-android-m2repository
          - extra-google-m2repository

    # - <<: *android-base
    #   env: [ANDROID=yes, USE_EMULATOR=yes]
    #   android:
    #     components:
    #       - tools
    #       - platform-tools
    #       - build-tools-23.0.1
    #       - android-23
    #       - extra-android-m2repository
    #       - extra-google-m2repository
    #       - sys-img-armeabi-v7a-google_apis-23

    - os: osx
      language: objective-c
      osx_image: xcode8.3
      node_js: '8'
      env: [IOS=yes, CAN_DEPLOY=yes]


# As seen in http://stackoverflow.com/a/31882307/2347774
# Prevent travis from building twice for PRs
branches:
  only:
    - master
    - /^travis/
    - /^v?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?$/


before_install:
  - echo "Now testing on $TRAVIS_OS_NAME"
  - echo "Using the android emulator? $USE_EMULATOR"
  - echo "Travis branch is $TRAVIS_BRANCH"
  - echo "Travis is in pull request $TRAVIS_PULL_REQUEST"
  - echo "Build triggered by $TRAVIS_EVENT_TYPE"
  - echo "Using node $TRAVIS_NODE_VERSION (node -v says $(node -v)"

  # make sure to use ruby 2.4
  - rvm use ruby-2.4.1 --install --binary --create
  - gem install bundler

  # only deploy from:
  # - cron-triggered jobs
  # - tagged commits
  # - commits whose messages contain the string [ci run beta]
  - if [[ $CAN_DEPLOY = yes && (
      $TRAVIS_EVENT_TYPE == "cron" ||
      $TRAVIS_TAG != "" ||
      $TRAVIS_COMMIT_MESSAGE == *"[ci run beta]"*
    ) ]]; then run_deploy=1; fi

  # force a consistent node version on android
  - if [[ $ANDROID ]]; then
      nvm install "$TRAVIS_NODE_VERSION";
      nvm use "$TRAVIS_NODE_VERSION";
    fi

  # turn off fancy npm stuff
  - npm config set spin=false
  - npm config set progress=false

  - npm install -g npm@5
  - if [[ $JS ]]; then npm install -g greenkeeper-lockfile@1; fi

install:
  # install packages (if the first fails, try once more)
  - npm install || npm install

  # install fastlane (if at first you don't succeed, try once more)
  - bundle install || bundle install

  - if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew install imagemagick; fi

before_script:
  - if [[ $JS ]]; then greenkeeper-lockfile-update; fi
  # Fire up the Android emulator
  - if [[ $ANDROID && $USE_EMULATOR = yes ]]; then
      bundle exec fastlane android ci-emulator;
    fi

script:
  # ensure the env file exists and fill it out
  - touch .env.js
  - echo "export const GOOGLE_CALENDAR_API_KEY = '$GCAL_KEY'" >> .env.js
  - echo "export const GOOGLE_MAPS_API_KEY = '$GMAPS_KEY'" >> .env.js

  # disable npm wrapper for npm scripts
  - echo "loglevel=silent" >> .npmrc

  # ensure the log directory exists for danger
  - mkdir -p logs/

  # run the platform-specific "script" sections
  - if [[ $JS ]]; then bash scripts/travis/script-js.sh; fi
  - if [[ $IOS ]]; then bundle exec fastlane ios ci-run; fi
  - if [[ $ANDROID ]]; then bundle exec fastlane android ci-run; fi

  # we run `danger` out here to ensure that it is run,
  # even if another task in script.sh fails.
  - if [[ $JS ]]; then npm run danger; fi

after_success:
  - bash scripts/travis/after_success.sh

deploy:
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_PAGES_TOKEN
    local_dir: docs/
    on:
      branch: master
      condition: $JS

before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
  - rm -rf $TMPDIR/jest_preprocess_cache

cache:
  bundler: true
  directories:
    - $HOME/.gradle
    - $HOME/.gradle/wrapper/
    - $HOME/.android/build-cache

notifications:
  webhooks:
    # trigger Buildtime Trend Service to parse Travis CI log
    - https://stormy-cliffs-59913.herokuapp.com/travis

{'fraction_non_alphanumeric': 0.1307920792079208, 'fraction_numerical': 0.019603960396039604, 'mean_word_length': 2.312889471958019, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '6380602', 'n_tokens_mistral': 3758, 'n_tokens_neox': 3581, 'n_words': 904}