<commit_before>version: 2.1
orbs:
  node: circleci/node@4.7.0

parameters:
  app-id:
    type: string
    default: "jsbattle"

jobs:
  build:
    docker:
      - image: 'circleci/node'
    steps:
      - checkout
      - run:
          name: Install Graphviz
          command: sudo apt install -y graphviz
      - run:
          name: Install Java
          command: | 
            sudo apt install -y default-jdk
            java --version
      - run: 
          name: Install Libs
          command: |
            sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
            sudo apt install -y libgbm-dev 
            npx browserslist@latest --update-db
      - restore_cache:
          keys:
            - node-v2-{{ .Branch }}-{{ checksum "package-lock.json" }}
            - node-v2-{{ .Branch }}-
            - node-v2-
      - run:
          name: Install node_modules
          command: |
            npm install
            npm run bootstrap
      - save_cache:
          paths:
            - ~/project/node_modules
          key: node-v2-{{ .Branch }}-{{ checksum "package-lock.json" }}
      - run:
          name: Bootstrap Project
          command: npm run bootstrap
      - run:
          name: Clean Project
          command: npm run clean
      - run:
          name: Lint Project
          command: npm run lint
      - run:
          name: Build Project
          command: npm run build
      - run:
          name: Test Project
          command: npm run test

workflows:
  cicd-workflow:
    jobs:
      - build<commit_msg>ci: add ssh key to the pipeline for debugging<commit_after>version: 2.1
orbs:
  node: circleci/node@4.7.0

parameters:
  app-id:
    type: string
    default: "jsbattle"

jobs:
  build:
    docker:
      - image: 'circleci/node'
    steps:
      - add_ssh_keys:
          fingerprints:
            - "fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:37:2a:88:ed:29:3d:0d:65"
      - checkout
      - run:
          name: Install Graphviz
          command: sudo apt install -y graphviz
      - run:
          name: Install Java
          command: | 
            sudo apt install -y default-jdk
            java --version
      - run: 
          name: Install Libs
          command: |
            sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
            sudo apt install -y libgbm-dev 
            npx browserslist@latest --update-db
      - restore_cache:
          keys:
            - node-v2-{{ .Branch }}-{{ checksum "package-lock.json" }}
            - node-v2-{{ .Branch }}-
            - node-v2-
      - run:
          name: Install node_modules
          command: |
            npm install
            npm run bootstrap
      - save_cache:
          paths:
            - ~/project/node_modules
          key: node-v2-{{ .Branch }}-{{ checksum "package-lock.json" }}
      - run:
          name: Bootstrap Project
          command: npm run bootstrap
      - run:
          name: Clean Project
          command: npm run clean
      - run:
          name: Lint Project
          command: npm run lint
      - run:
          name: Build Project
          command: npm run build
      - run:
          name: Test Project
          command: npm run test

workflows:
  cicd-workflow:
    jobs:
      - build
{'fraction_non_alphanumeric': 0.09404761904761905, 'fraction_numerical': 0.016666666666666666, 'mean_word_length': 1.3870738636363635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1833911', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1010, 'n_words': 278}