<commit_before># Build, test and push gems to the FreeAgent registry.
# https://github.com/orgs/fac/packages?ecosystem=rubygems
# https://www.notion.so/freeagent/Internal-gems-5c8098501fcc48e4921be31aa9b4d495
name: FreeAgent Gem
on:
  push:
    branches: [main, master]
  pull_request:

jobs:
  # Install the bundle and run the gems test suite.
  tests:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1 # .ruby-version
      with:
        bundler-cache: true # bundle install

    - name: Test
      run: bundle exec rake

  # Builds that pass testing above, will trigger a build and push of the new
  # gem version to the registry. If the version.rb has not been bumped since
  # the last release, the push will no-op.
  release:
    needs:   tests
    runs-on: ubuntu-latest

    steps:
    - uses: fac/ruby-gem-setup-credentials-action@v2
      with:
        token: ${{ secrets.github_token }}

    # Build the gem package
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        bundler-cache: true
    - run: bundle exec rake build

    # Release production gem version from default branch
    - name: Release
      if:   github.ref == 'refs/heads/main'
      uses: fac/ruby-gem-push-action@v2
      with:
        key: github

    # PR branch builds will release pre-release gems
    - name: Pre-Release
      if:   github.ref != 'refs/heads/main'
      uses: fac/ruby-gem-push-action@v2
      with:
        key: github
        pre-release: true<commit_msg>Fix default branch name<commit_after># Build, test and push gems to the FreeAgent registry.
# https://github.com/orgs/fac/packages?ecosystem=rubygems
# https://www.notion.so/freeagent/Internal-gems-5c8098501fcc48e4921be31aa9b4d495
name: FreeAgent Gem
on:
  push:
    branches: [master]
  pull_request:

jobs:
  # Install the bundle and run the gems test suite.
  tests:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1 # .ruby-version
      with:
        bundler-cache: true # bundle install

    - name: Test
      run: bundle exec rake

  # Builds that pass testing above, will trigger a build and push of the new
  # gem version to the registry. If the version.rb has not been bumped since
  # the last release, the push will no-op.
  release:
    needs:   tests
    runs-on: ubuntu-latest

    steps:
    - uses: fac/ruby-gem-setup-credentials-action@v2
      with:
        token: ${{ secrets.github_token }}

    # Build the gem package
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        bundler-cache: true
    - run: bundle exec rake build

    # Release production gem version from default branch
    - name: Release
      if:   github.ref == 'refs/heads/master'
      uses: fac/ruby-gem-push-action@v2
      with:
        key: github

    # PR branch builds will release pre-release gems
    - name: Pre-Release
      if:   github.ref != 'refs/heads/master'
      uses: fac/ruby-gem-push-action@v2
      with:
        key: github
        pre-release: true
{'fraction_non_alphanumeric': 0.09611650485436893, 'fraction_numerical': 0.018122977346278317, 'mean_word_length': 2.4459308807134894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '7640708', 'n_tokens_mistral': 1066, 'n_tokens_neox': 989, 'n_words': 297}