<commit_before>version: 2
jobs:
  build:
    docker:
      - image: circleci/clojure:openjdk-8-lein-2.9.1-node
    steps:
      - checkout
      - restore_cache:
          keys:
            - dependency-cache-{{ checksum "project.clj" }}-1
            - dependency-cache-{{ checksum "package-lock.json" }}-1
      - run:
          command: lein deps
      - save_cache:
          key: dependency-cache-{{ checksum "project.clj" }}-1
          paths:
            - ~/.m2
      - run:
          command: npm install
      - save_cache:
          key: dependency-cache-{{ checksum "package-lock.json" }}-1
          paths:
            - node_modules
      - run:
          command: echo ${CIRCLE_SHA1} > resources/version
      - run:
          command: lein uberjar
      - run:
          command: git submodule update --init
      - run:
          command: lein run -m pc.tasks/compile-less
      - run:
          command: lein cljsbuild once production
      - run:
          command: du -h resources/public/cljs/production/frontend.js resources/public/css/app.css
      - run:
          command: lein test
      - persist_to_workspace:
          root: ./
          paths:
            - src
            - script
            - resources
            - target

  deploy:
    docker:
      - image: circleci/clojure:openjdk-8-lein-2.9.1-node
    steps:
      - attach_workspace:
          at: ./
      - restore_cache:
          keys:
            - dependency-cache-{{ checksum "project.clj" }}-1
      - run:
          command: lein run -m pc.assets/upload-manifest ${CIRCLE_SHA1}
      - run:
          command: lein run -m pc.deploy/upload-slug ${CIRCLE_SHA1}
      - run:
          command: cp script/s3-dl.sh ~/bin
      - run:
          command: AWS_ACCESS_KEY_ID=$DEPLOY_S3_ID AWS_SECRET_ACCESS_KEY=$DEPLOY_S3_SECRET ./script/download-latest-jar.sh > pc-standalone.jar
      - run:
          command: java -cp pc-standalone.jar clojure.main --main pc.version | grep ${CIRCLE_SHA1}

workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
          filters:
            branches:
              only: master
<commit_msg>persist project.clj<commit_after>version: 2
jobs:
  build:
    docker:
      - image: circleci/clojure:openjdk-8-lein-2.9.1-node
    steps:
      - checkout
      - restore_cache:
          keys:
            - dependency-cache-{{ checksum "project.clj" }}-1
            - dependency-cache-{{ checksum "package-lock.json" }}-1
      - run:
          command: lein deps
      - save_cache:
          key: dependency-cache-{{ checksum "project.clj" }}-1
          paths:
            - ~/.m2
      - run:
          command: npm install
      - save_cache:
          key: dependency-cache-{{ checksum "package-lock.json" }}-1
          paths:
            - node_modules
      - run:
          command: echo ${CIRCLE_SHA1} > resources/version
      - run:
          command: lein uberjar
      - run:
          command: git submodule update --init
      - run:
          command: lein run -m pc.tasks/compile-less
      - run:
          command: lein cljsbuild once production
      - run:
          command: du -h resources/public/cljs/production/frontend.js resources/public/css/app.css
      - run:
          command: lein test
      - persist_to_workspace:
          root: ./
          paths:
            - src
            - script
            - resources
            - target
            - project.clj

  deploy:
    docker:
      - image: circleci/clojure:openjdk-8-lein-2.9.1-node
    steps:
      - attach_workspace:
          at: ./
      - restore_cache:
          keys:
            - dependency-cache-{{ checksum "project.clj" }}-1
      - run:
          command: ls
      - run:
          command: lein run -m pc.assets/upload-manifest ${CIRCLE_SHA1}
      - run:
          command: lein run -m pc.deploy/upload-slug ${CIRCLE_SHA1}
      - run:
          command: cp script/s3-dl.sh ~/bin
      - run:
          command: AWS_ACCESS_KEY_ID=$DEPLOY_S3_ID AWS_SECRET_ACCESS_KEY=$DEPLOY_S3_SECRET ./script/download-latest-jar.sh > pc-standalone.jar
      - run:
          command: java -cp pc-standalone.jar clojure.main --main pc.version | grep ${CIRCLE_SHA1}

workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
          filters:
            branches:
              only: master

{'fraction_non_alphanumeric': 0.10978627671541058, 'fraction_numerical': 0.010348706411698537, 'mean_word_length': 1.4509371554575523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7179162', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1408, 'n_words': 301}