<commit_before># Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2.1

orbs:
  codecov: codecov/codecov@1.0.5

jobs:
  test:
    docker:
      - image: circleci/golang:1.14

    environment:
      GO111MODULE: "on"
      PROJECT_DIR: /go/src/github.com/OWASP/Amass

    working_directory: $PROJECT_DIR

    steps:
      - checkout
      - run:
          name: "Amass Unit Tests and Coverage Reports"
          command: |
            cd $PROJECT_DIR
            go get github.com/OWASP/Amass/v3/...
            go test -coverprofile=coverage.txt -covermode=atomic ./...
      - codecov/upload:
          conf: $PROJECT_DIR/.codecov.yml
          file: $PROJECT_DIR/coverage.txt

workflows:
  version: 2.1
  main:
    jobs:
      - test
#      - binaries:
#          requires:
#            - test
#          filters:
#            branches:
#              only: master<commit_msg>added support for code climate test coverage analysis<commit_after>version: 2.1

orbs:
  codecov: codecov/codecov@1.0.5

jobs:
  test:
    docker:
      - image: circleci/golang:1.14

    environment:
      GO111MODULE: "on"
      PROJECT_DIR: /go/src/github.com/OWASP/Amass

    working_directory: $PROJECT_DIR

    steps:
      - checkout

      - run:
        name: Setup Code Climate test-reporter
        command: |
          curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /go/cc-test-reporter
          chmod +x /go/cc-test-reporter

      - run:
          name: "Amass Unit Tests and Coverage Reports"
          command: |
            cd $PROJECT_DIR
            go get github.com/OWASP/Amass/v3/...
            /go/cc-test-reporter before-build
            go test -coverprofile=c.out -covermode=atomic ./...
            /go/cc-test-reporter after-build -r $CODE_CLIMATE_TOKEN -t gocov -p ./ --exit-code $?

      - codecov/upload:
          conf: $PROJECT_DIR/.codecov.yml
          file: $PROJECT_DIR/c.out

      - run:
          name: Remove Code Climate test-reporter
          command: |
            rm /go/cc-test-reporter

workflows:
  version: 2.1
  main:
    jobs:
      - test
{'fraction_non_alphanumeric': 0.11121281464530892, 'fraction_numerical': 0.015560640732265447, 'mean_word_length': 1.7601010101010102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '192329', 'n_tokens_mistral': 770, 'n_tokens_neox': 722, 'n_words': 153}