<commit_before>name: Tests
on:
  push:
    branches: ['*']
  pull_request:
    branches: ['*']

jobs:
  test:
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        include:
          ### TEST ALL RUBY VERSIONS, USE DEFAULT GEMFILE
          - ruby: 2.3
          - ruby: 2.4
          - ruby: 2.5
          - ruby: 2.6
          - ruby: 2.7
          - ruby: 3.0

    env:
      BUNDLE_GEMFILE: "${{ matrix.gemfile }}"

    steps:
    - uses: actions/checkout@v2

    - name: Install ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: "${{ matrix.ruby }}"

    - name: Bundle
      run: |
        gem install bundler:1.17.3
        bundle _1.17.3_ install

    - name: Run tests
      run: |
        #bundle exec rake db:test:prepare
        bundle exec rake<commit_msg>Add Ruby 3.1 to Test Suite<commit_after>name: Tests
on:
  push:
    branches: ['*']
  pull_request:
    branches: ['*']

jobs:
  test:
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        include:
          ### TEST ALL RUBY VERSIONS, USE DEFAULT GEMFILE
          - ruby: 2.3
          - ruby: 2.4
          - ruby: 2.5
          - ruby: 2.6
          - ruby: 2.7
          - ruby: "3.0" ### must be quoted otherwise will be treated as "3" which will resolve to latest 3.x version
          - ruby: 3.1

    env:
      BUNDLE_GEMFILE: "${{ matrix.gemfile }}"

    steps:
    - uses: actions/checkout@v2

    - name: Install ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: "${{ matrix.ruby }}"

    - name: Bundle
      run: |
        gem install bundler
        bundle install

    - name: Run tests
      run: |
        bundle exec rake
{'fraction_non_alphanumeric': 0.1191588785046729, 'fraction_numerical': 0.029205607476635514, 'mean_word_length': 1.5154185022026432, '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': '4007627', 'n_tokens_mistral': 633, 'n_tokens_neox': 580, 'n_words': 155}