<commit_before>version: 2.1

orbs:
  browser-tools: circleci/browser-tools@1.1.1

defaults: &defaults
  working_directory: ~/repo

jobs:
  prepare:
    <<: *defaults

    steps:
      - checkout
      - persist_to_workspace:
          root: ~/repo
          paths: .

  build:
    working_directory: ~/repo
    docker:
      - image: circleci/openjdk:8-jdk-browsers
    environment:
      DISPLAY: :99

    steps:
      - run: sudo Xvfb :99 -screen 0 1920x1200x24 > /dev/null 2>&1 &
      - attach_workspace:
          at: ~/repo
      - browser-tools/install-chrome
      - browser-tools/install-firefox
      - browser-tools/install-chromedriver
      - run:
          command: |
            google-chrome --version
            firefox --version
            chromedriver --version
            ps -efa | grep Xvfb
          name: Check install
      - run: export DISPLAY=:99 && mvn clean install
      - store_artifacts:
          path: ~/repo/target/surefire-reports
      - store_artifacts:
          path: ~/repo/target/webtests-videos

workflows:
  build:
    jobs:
      - build:
          requires:
            - prepare<commit_msg>circle ci<commit_after>version: 2.1

orbs:
  browser-tools: circleci/browser-tools@1.1.1

defaults: &defaults
  working_directory: ~/repo
  docker:
    - image: circleci/node:erbium

jobs:
  build:
    <<: *defaults

    steps:
      - checkout
      - persist_to_workspace:
          root: ~/repo
          paths: .

  webtests:
    working_directory: ~/repo
    docker:
      - image: circleci/openjdk:8-jdk-browsers
    environment:
      DISPLAY: :99

    steps:
      - run: sudo Xvfb :99 -screen 0 1920x1200x24 > /dev/null 2>&1 &
      - attach_workspace:
          at: ~/repo
      - browser-tools/install-chrome
      - browser-tools/install-chromedriver
      - run:
          command: |
            google-chrome --version
            chromedriver --version
            ps -efa | grep Xvfb
          name: Check install
      - run: export DISPLAY=:99 && mvn clean install
      - store_artifacts:
          path: ~/repo/core/webtests/target/surefire-reports
      - store_artifacts:
          path: ~/repo/core/target/webtests-videos

workflows:
  version: 2
  build-deploy:
    jobs:
      - build:
          filters:
            branches:
              ignore: /^gh-pages$/
      - webtests:
          requires:
            - build
{'fraction_non_alphanumeric': 0.10486577181208054, 'fraction_numerical': 0.02139261744966443, 'mean_word_length': 1.6858108108108107, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4505403', 'n_tokens_mistral': 815, 'n_tokens_neox': 757, 'n_words': 159}