<commit_before>version: 2
jobs:
  build:
    working_directory: /go/src/github.com/drausin/libri
    docker:
      - image: daedalus2718/libri-build
    parallelism: 2
    steps:
      - checkout
      - setup_remote_docker
      # TODO (restore deps cache once using glide)
      - run:
          name: Install dependencies
          command: make get-deps
      # TODO save deps cache once using glide
      - run:
          name: Build
          command: |
            make build          # ensure everything builds ok
            case ${CIRCLE_NODE_INDEX} in
              1)
                make build-static   # build linux binary for Docker image
                make docker-image   # ensure Docker image builds ok, even though only used on deployment
                ;;
            esac
      - store_artifacts:
          path: deploy/bin
      - run:
          name: Test
          command: |
            case ${CIRCLE_NODE_INDEX} in
              0)
                make test-cover
                make acceptance
                bash <(curl -s https://codecov.io/bash) -f test-coverage-merged.cov
                ;;
              1)
                make demo
                ;;
            esac
      - store_artifacts:
          path: acceptance.log
      - run:
          name: Lint
          command: if [[ ${CIRCLE_NODE_INDEX} -eq 1 ]]; then make lint; fi

      - deploy:
          name: Publish docker image
          command: |
            if [[ ${CIRCLE_NODE_INDEX} -eq 1 && "${CIRCLE_BRANCH}" == "develop" ]]; then
              docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}<commit_msg>swap circleci containers (#84)<commit_after>version: 2
jobs:
  build:
    working_directory: /go/src/github.com/drausin/libri
    docker:
      - image: daedalus2718/libri-build
    parallelism: 2
    steps:
      - checkout
      - setup_remote_docker
      # TODO (restore deps cache once using glide)
      - run:
          name: Install dependencies
          command: make get-deps
      # TODO save deps cache once using glide
      - run:
          name: Build
          command: |
            make build          # ensure everything builds ok
            case ${CIRCLE_NODE_INDEX} in
              0)
                make build-static   # build linux binary for Docker image
                make docker-image   # ensure Docker image builds ok, even though only used on deployment
                ;;
            esac
      - store_artifacts:
          path: deploy/bin
      - run:
          name: Test
          command: |
            case ${CIRCLE_NODE_INDEX} in
              0)
                make demo
                ;;
              1)
                make test-cover
                make acceptance
                bash <(curl -s https://codecov.io/bash) -f test-coverage-merged.cov
                ;;
            esac
      - store_artifacts:
          path: acceptance.log
      - run:
          name: Lint
          command: if [[ ${CIRCLE_NODE_INDEX} -eq 0 ]]; then make lint; fi

      - deploy:
          name: Publish docker image
          command: |
            if [[ "${CIRCLE_BRANCH}" == "develop" ]]; then
              docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
{'fraction_non_alphanumeric': 0.08081123244929797, 'fraction_numerical': 0.007176287051482059, 'mean_word_length': 1.3282498184458968, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '469248', 'n_tokens_mistral': 935, 'n_tokens_neox': 863, 'n_words': 259}