<commit_before>version: 2
jobs:
  build:
    docker:
      - image: fmidev/smartmet-cibase:latest
    steps:
      - checkout
      - run:
          name: Install build dependencies
          command: ci-build deps
      - run:
          name: Build RPM
          command: ci-build rpm
      - persist_to_workspace:
          root: /dist
          paths: ./*.rpm
  test:
    docker:
      - image: fmidev/smartmet-cibase:latest
    steps:
      - checkout
      - attach_workspace:
          at: /dist
      - run:
          name: Installation test
          command: ci-build dummy ; sudo yum install -y /dist/*.rpm
      - run:
          name: Test prepare
          command: ci-build testprep
      - run:
          name: Test
          command: ci-build test
      - store_artifacts:
          path: /dist
          destination: dist/

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build<commit_msg>Added a branch filter, build only master<commit_after>version: 2
jobs:
  build:
    docker:
      - image: fmidev/smartmet-cibase:latest
    steps:
      - checkout
      - run:
          name: Install build dependencies
          command: ci-build deps
      - run:
          name: Build RPM
          command: ci-build rpm
      - persist_to_workspace:
          root: /dist
          paths: ./*.rpm
  test:
    docker:
      - image: fmidev/smartmet-cibase:latest
    steps:
      - checkout
      - attach_workspace:
          at: /dist
      - run:
          name: Installation test
          command: ci-build dummy ; sudo yum install -y /dist/*.rpm
      - run:
          name: Test prepare
          command: ci-build testprep
      - run:
          name: Test
          command: ci-build test
      - store_artifacts:
          path: /dist
          destination: dist/

workflows:
  version: 2
  build-test:
    jobs:
      - build
          filters:
            branches:
              only:
                -master
      - test:
          requires:
            - build
{'fraction_non_alphanumeric': 0.08292682926829269, 'fraction_numerical': 0.001951219512195122, 'mean_word_length': 1.3070866141732282, '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': '2599770', 'n_tokens_mistral': 631, 'n_tokens_neox': 596, 'n_words': 163}