<commit_before># Customize the test machine
machine:
  pre:
      - git config --global user.email "<EMAIL>"
      - git config --global user.name "circlebot"
      - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
  services:
      - docker
  node:
    version: 7.7.3

dependencies:
  pre:
      # install docker-compose
      - sudo curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
      - sudo chmod +x /usr/local/bin/docker-compose
      # install and setup triton
      - yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
      - echo '{"url":"https://eu-ams-1.api.joyent.com", "account":"'$SDC_ACCOUNT'", "keyId":"'$SDC_KEY_ID'", "name":"eu-ams-1", "curr":true}' | triton profile create -f -
      - triton env --docker eu-ams-1
  override:
      # add rethinkdb sources
      - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
      - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
      # install zmq and rdb
      - sudo apt-get update && sudo apt-get install libzmq3-dev rethinkdb
      # install node dependencies
      - yarn install
      - yarn run prepare

test:
  override:
      # lint
      -  yarn run lint
      # test
      -  yarn run test

deployment:
  development:
    branch: master
    commands:
      - ./scripts/deploy
#   production:
#     tag: /production-*/
#     commands:
#       - CIRCLE_BRANCH=staging ./bin/docker-login
#       - CIRCLE_BRANCH=staging ./bin/on-changes-publish-ui
#       - CIRCLE_BRANCH=staging make -j2 build
#       - CIRCLE_BRANCH=staging make -j2 push
#       - CIRCLE_BRANCH=staging ./bin/deploy
<commit_msg>chore: install dependencies on deployment stage<commit_after># Customize the test machine
machine:
  pre:
      - git config --global user.email "<EMAIL>"
      - git config --global user.name "circlebot"
      - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
  services:
      - docker
  node:
    version: 7.7.3

dependencies:
  override:
      # add rethinkdb sources
      - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
      - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
      # install zmq and rdb
      - sudo apt-get update && sudo apt-get install libzmq3-dev rethinkdb
      # install node dependencies
      - yarn install
      - yarn run prepare

test:
  override:
      # lint
      -  yarn run lint
      # test
      -  yarn run test

deployment:
  pre:
    # install docker-compose
    - sudo curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
    - sudo chmod +x /usr/local/bin/docker-compose
    # install and setup triton
    - yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
    - echo '{"url":"https://eu-ams-1.api.joyent.com", "account":"'$SDC_ACCOUNT'", "keyId":"'$SDC_KEY_ID'", "name":"eu-ams-1", "curr":true}' | triton profile create -f -
    - triton env --docker eu-ams-1

  development:
    branch: master
    commands:
      - ./scripts/deploy
#   production:
#     tag: /production-*/
#     commands:
#       - CIRCLE_BRANCH=staging ./bin/docker-login
#       - CIRCLE_BRANCH=staging ./bin/on-changes-publish-ui
#       - CIRCLE_BRANCH=staging make -j2 build
#       - CIRCLE_BRANCH=staging make -j2 push
#       - CIRCLE_BRANCH=staging ./bin/deploy

{'fraction_non_alphanumeric': 0.138822275512923, 'fraction_numerical': 0.011191047162270184, 'mean_word_length': 2.403445149592022, 'pattern_counts': {'":': 10, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3766333', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1307, 'n_words': 289}