<commit_before>version: 2
jobs:
  build:
    working_directory: /home/koa-single-page
    docker:
      - image: node:8

    steps:
      - checkout

      - setup_remote_docker

      - restore_cache:
          key: koa-single-page-{{ .Branch }}-{{ checksum "yarn.lock" }}

      - run:
          name: Dependencies
          command: sh script/setup

      - run:
         name: Lint
         command: sh script/lint

      - run:
          name: Test
          command: sh script/test

      - run:
          name: Build
          command: sh script/build

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.04.0-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin
      - run:
          name: List After
          command: ls -la

      - save_cache:
          key: koa-single-page-{{ .Branch }}-{{ checksum "yarn.lock" }}
          paths:
            - node_modules
            - /tmp/docker

      - store_test_results:
          path: junit.xml
<commit_msg>feat: Added auto deploy to docker hub<commit_after>version: 2
jobs:
  build:
    working_directory: /home/koa-single-page
    docker:
      - image: node:8

    steps:
      - checkout

      - setup_remote_docker

      - restore_cache:
          key: koa-single-page-{{ .Branch }}-{{ checksum "yarn.lock" }}

      - run:
          name: Dependencies
          command: sh script/setup

      - run:
         name: Lint
         command: sh script/lint

      - run:
          name: Test
          command: sh script/test

      - run:
          name: Build
          command: sh script/build

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.04.0-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin
      - run:
          name: List After
          command: ls -la

      - save_cache:
          key: koa-single-page-{{ .Branch }}-{{ checksum "yarn.lock" }}
          paths:
            - node_modules
            - /tmp/docker

      - store_test_results:
          path: junit.xml

      - deploy:
          name: Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              docker login -u $DOCKER_USER -p $DOCKER_PASS
              sh script/package
              sh script/publish
            fi

{'fraction_non_alphanumeric': 0.11310661062285059, 'fraction_numerical': 0.008406572411157814, 'mean_word_length': 1.2705984388551606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4697601', 'n_tokens_mistral': 864, 'n_tokens_neox': 795, 'n_words': 193}