<commit_before>name: Build

on:
  workflow_dispatch:
  push:
  pull_request:

env:
  DISABLE_KNAPSACK: true
  TIMEZONE: UTC
  COVERAGE: true
  RSPEC_RETRY_RETRY_COUNT: 3
  RAILS_ENV: test

permissions:
  contents: read

jobs:
  rspec:
    runs-on: ubuntu-20.04
    services:
      postgres:
        image: postgres:10
        ports: ["5432:5432"]
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        env:
          POSTGRES_DB: open_food_network_test
          POSTGRES_USER: ofn
          POSTGRES_PASSWORD: <PASSWORD>
    strategy:
      matrix:
        specs:
          - "spec/controllers"
          - "spec/models"
          - "spec/lib"
          - "spec/migrations"
          - "spec/serializers"
          - "spec/system/admin/[a-o0-9]*_spec.rb"
          - "spec/system/admin/[p-z]*_spec.rb"
          - "spec/system/consumer"
          - "engines/*/spec"
      fail-fast: false
    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically

      - uses: actions/setup-node@v2
        with:
          node-version: '14.15.5'

      - name: Install JS dependencies
        run: yarn install --frozen-lockfile

      - name: Set up database
        run: |
          bundle exec rake db:create
          bundle exec rake db:schema:load<commit_msg>Removes _spec.rb ending from admin specs on build.yml<commit_after>name: Build

on:
  workflow_dispatch:
  push:
  pull_request:

env:
  DISABLE_KNAPSACK: true
  TIMEZONE: UTC
  COVERAGE: true
  RSPEC_RETRY_RETRY_COUNT: 3
  RAILS_ENV: test

permissions:
  contents: read

jobs:
  rspec:
    runs-on: ubuntu-20.04
    services:
      postgres:
        image: postgres:10
        ports: ["5432:5432"]
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        env:
          POSTGRES_DB: open_food_network_test
          POSTGRES_USER: ofn
          POSTGRES_PASSWORD: <PASSWORD>
    strategy:
      matrix:
        specs:
          - "spec/controllers"
          - "spec/models"
          - "spec/lib"
          - "spec/migrations"
          - "spec/serializers"
          - "spec/system/admin/[a-o0-9]*"
          - "spec/system/admin/[p-z]*"
          - "spec/system/consumer"
          - "engines/*/spec"
      fail-fast: false
    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically

      - uses: actions/setup-node@v2
        with:
          node-version: '14.15.5'

      - name: Install JS dependencies
        run: yarn install --frozen-lockfile

      - name: Set up database
        run: |
          bundle exec rake db:create
          bundle exec rake db:schema:load
{'fraction_non_alphanumeric': 0.1015161502966381, 'fraction_numerical': 0.01911667765326302, 'mean_word_length': 1.7049910873440286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6481845', 'n_tokens_mistral': 1058, 'n_tokens_neox': 993, 'n_words': 218}