<commit_before>name: Ruby

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    services:
      redis:
        image: redis
        ports:
        - 6379:6379
        options: --entrypoint redis-server

    steps:
    - uses: actions/checkout@v2

    - name: Set up Ruby 2.4
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.4.x

    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-

    - name: Bundle install
      run: |
        gem install bundler
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3

    - name: Test with RSpec
      env:
        REDIS_HOST: redis<commit_msg>Add a test matrix with all the ruby versions<commit_after>name: Ruby

on: [push]

jobs:
  build:

    runs-on: ubuntu-16.04

    services:
      redis:
        image: redis
        ports:
        - 6379:6379
        options: --entrypoint redis-server

    strategy:
      matrix:
        ruby: [2.4, 2.5, 2.6, 2.7]
    steps:
    - uses: actions/checkout@v2

    - name: Setup Ruby ${{ matrix.ruby }}
      uses: eregon/use-ruby-action@v1
      with:
        ruby-version: ${{ matrix.ruby }}

    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-ruby-version-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-ruby-version-${{ matrix.ruby }}-gems-

    - name: Install dependencies
      run: |
        gem install bundler
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3

    - name: Test with RSpec
      env:
        REDIS_HOST: redis
{'fraction_non_alphanumeric': 0.1278409090909091, 'fraction_numerical': 0.023863636363636365, 'mean_word_length': 1.734472049689441, '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': '1651222', 'n_tokens_mistral': 632, 'n_tokens_neox': 568, 'n_words': 149}