<commit_before>---
defaults: &defaults
  working_directory: ~/gobierto
  docker:
    - image: circleci/ruby:2.6.5-node-browsers
      environment:
        RAILS_ENV: test
        PGHOST: localhost
        PGUSER: gobierto
        # Disable spring so bin/rails works. See: https://github.com/rails/spring/pull/546
        DISABLE_SPRING: true
    - image: postgres:12
      environment:
        POSTGRES_USER: gobierto
        POSTGRES_DB: gobierto_test
        POSTGRES_PASSWORD: ""
    - image: elasticsearch:2.4.1
    - image: redis:4.0.9

version: 2
jobs:
  bundle_dependencies:
    <<: *defaults
    steps:
      - checkout
      - attach_workspace:
          at: ~/gobierto
      - restore_cache:
          name: "[Bundler] Restore cache"
          keys:
            - gobierto-{{ checksum "Gemfile.lock" }}
      - run:
          name: "[Bundler] Install dependencies"
          command: bundle install --path vendor/bundle --jobs=4 --retry=3  --without development
      - save_cache:
          name: "[Bundler] Cache dependencies"
          key: gobierto-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle
      - persist_to_workspace:
          root: ~/gobierto
          paths:
            - vendor/bundle

  tests:<commit_msg>Set POSTGTES_PASSWORD in circleci docker image<commit_after>---
defaults: &defaults
  working_directory: ~/gobierto
  docker:
    - image: circleci/ruby:2.6.5-node-browsers
      environment:
        RAILS_ENV: test
        PGHOST: localhost
        PGUSER: gobierto
        # Disable spring so bin/rails works. See: https://github.com/rails/spring/pull/546
        DISABLE_SPRING: true
    - image: postgres:12
      environment:
        POSTGRES_USER: gobierto
        POSTGRES_DB: gobierto_test
        POSTGRES_PASSWORD: gobierto
    - image: elasticsearch:2.4.1
    - image: redis:4.0.9

version: 2
jobs:
  bundle_dependencies:
    <<: *defaults
    steps:
      - checkout
      - attach_workspace:
          at: ~/gobierto
      - restore_cache:
          name: "[Bundler] Restore cache"
          keys:
            - gobierto-{{ checksum "Gemfile.lock" }}
      - run:
          name: "[Bundler] Install dependencies"
          command: bundle install --path vendor/bundle --jobs=4 --retry=3  --without development
      - save_cache:
          name: "[Bundler] Cache dependencies"
          key: gobierto-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle
      - persist_to_workspace:
          root: ~/gobierto
          paths:
            - vendor/bundle

  tests:
{'fraction_non_alphanumeric': 0.10386567746973838, 'fraction_numerical': 0.013276064037485357, 'mean_word_length': 1.9047619047619047, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4782061', 'n_tokens_mistral': 831, 'n_tokens_neox': 805, 'n_words': 177}