<commit_before>name: Tests
on:
  pull_request:
  push:
    branches:
      - master
jobs:
  rails:
    strategy:
      fail-fast: false
      matrix:
        rubygems_version: ['3.2.3', 'latest']
        ruby_version: ['2.7.4']
    name: Rails tests (Ruby ${{ matrix.ruby_version }}, RubyGems ${{ matrix.rubygems_version }})
    runs-on: ubuntu-18.04
    env:
      RUBYGEMS_VERSION: ${{ matrix.rubygems_version }}
      # If we don't supply a CC_TEST_REPORTER_ID simplecov won't output coverage in a way that
      # code climate understands
      CC_TEST_REPORTER_ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    steps:
    - uses: actions/checkout@v2
    - name: Install and start services
      run: |
        ./script/install_toxiproxy.sh
        docker-compose up -d
    - name: Wait for ES to boot
      run: |
        timeout 300 bash -c "until curl --silent --output /dev/null http://localhost:9200/_cat/health?h=st; do printf '.'; sleep 5; done; printf '\n'"
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby_version }}
        bundler-cache: true
    - name: Prepare environment
      run: |
        cp config/database.yml.example config/database.yml
        bundle exec rake db:setup
    - name: Tests
      run: bin/rails test
    - name: archive coverage
      if: matrix.rubygems_version == '3.2.3'
      uses: actions/upload-artifact@v2
      with:
        name: coverage
        path: |
          coverage<commit_msg>Add step in test to set rubygems version<commit_after>name: Tests
on:
  pull_request:
  push:
    branches:
      - master
jobs:
  rails:
    strategy:
      fail-fast: false
      matrix:
        rubygems_version: ['3.2.3', 'latest']
        ruby_version: ['2.7.4']
    name: Rails tests (Ruby ${{ matrix.ruby_version }}, RubyGems ${{ matrix.rubygems_version }})
    runs-on: ubuntu-18.04
    env:
      RUBYGEMS_VERSION: ${{ matrix.rubygems_version }}
      # If we don't supply a CC_TEST_REPORTER_ID simplecov won't output coverage in a way that
      # code climate understands
      CC_TEST_REPORTER_ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    steps:
    - uses: actions/checkout@v2
    - name: Install and start services
      run: |
        ./script/install_toxiproxy.sh
        docker-compose up -d
    - name: Wait for ES to boot
      run: |
        timeout 300 bash -c "until curl --silent --output /dev/null http://localhost:9200/_cat/health?h=st; do printf '.'; sleep 5; done; printf '\n'"
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby_version }}
        bundler-cache: true
    - name: set rubygems version
      run: |
        if [ "$RUBYGEMS_VERSION" != "latest" ]; then
          gem update --system $RUBYGEMS_VERSION;
        else
          gem update --system
        fi
        gem --version
        bundle --version
    - name: Prepare environment
      run: |
        cp config/database.yml.example config/database.yml
        bundle exec rake db:setup
    - name: Tests
      run: bin/rails test
    - name: archive coverage
      if: matrix.rubygems_version == '3.2.3'
      uses: actions/upload-artifact@v2
      with:
        name: coverage
        path: |
          coverage
{'fraction_non_alphanumeric': 0.10510141364474493, 'fraction_numerical': 0.014751075599262446, 'mean_word_length': 2.23558648111332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '5970912', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1012, 'n_words': 272}