<commit_before>version: 2

jobs:
  build:
    docker:
      - image: docker

    parallelism: 1
    steps:
      - checkout
      - setup_remote_docker:
          docker_layer_caching: true
      - run:
          name: Environment Information
          command: |
            docker --version
            docker info
            whoami
            pwd
            ls -lr
      - run:
          name: Prepare Build
          command: |
            apk update && apk add curl curl-dev bash
            curl -sSL -o /tmp/bats_v0.4.0.tar.gz https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz
            tar -xf /tmp/bats_v0.4.0.tar.gz
            bats-0.4.0/install.sh /usr/local
      - run:
          name: Build Wechaty
          command: |
            # docker run -ti -v "$(pwd)":/mnt nlknguyen/alpine-shellcheck bin/*.sh
            NO_CACHE=1 ./scripts/docker.sh build
      - run:
          name: Testing
          command: ./scripts/docker.sh test
      - deploy:
          name: Deploy Wechaty Image to Docker Hub
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              curl -X POST -d '{"from":"circleci"}' "$DOCKER_REBUILD_URL"
            else
              echo "Skipped for not master branch."
            fi<commit_msg>restore machine mode instead of docker<commit_after>version: 2

jobs:
  build:
    machine: true
    parallelism: 1

    steps:
      - checkout
      # - setup_remote_docker:
      #     docker_layer_caching: true
      - run:
          name: Environment Information
          command: |
            docker --version
            docker info
            whoami
            pwd
            ls -lr
      - run:
          name: Prepare Build
          command: |
            apk update && apk add curl curl-dev bash
            curl -sSL -o /tmp/bats_v0.4.0.tar.gz https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz
            tar -xf /tmp/bats_v0.4.0.tar.gz
            bats-0.4.0/install.sh /usr/local
      - run:
          name: Build Wechaty
          command: |
            docker run -ti -v "$(pwd)":/mnt nlknguyen/alpine-shellcheck bin/*.sh
            NO_CACHE=1 ./scripts/docker.sh build
      - run:
          name: Testing
          command: ./scripts/docker.sh test
      - deploy:
          name: Deploy Wechaty Image to Docker Hub
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              curl -X POST -d '{"from":"circleci"}' "$DOCKER_REBUILD_URL"
            else
              echo "Skipped for not master branch."
            fi
{'fraction_non_alphanumeric': 0.1027745212973818, 'fraction_numerical': 0.011723329425556858, 'mean_word_length': 1.348623853211009, 'pattern_counts': {'":': 4, '<': 3, '<?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': '6469714', 'n_tokens_mistral': 824, 'n_tokens_neox': 782, 'n_words': 197}