<commit_before>name: Test and coverage measurement

on:
  push:
    paths-ignore:
      - doc/**
      - README.md
  pull_request: {}

jobs:
  test:
    name: "Ruby 3.0: test and coverage measurement"
    strategy:
      fail-fast: false
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
    env:
      RAILS_ENV: test
      TZ: Asia/Tokyo
    services:
      db:
        image: groonga/mroonga:mysql5732_mroonga1010
        ports:
          - 33060:3306
      redis:
        image: redis:6
        ports:
          - 6379:6379
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0

          # runs 'bundle install' and caches installed gems automatically
          bundler-cache: true
      - name: Setup database
        run: |
          cp config/database.yml.github_actions config/database.yml
          bin/rails db:create
          bin/rails db:migrate
      - uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147
        with:
          coverageCommand: bin/rails test<commit_msg>GitHub Actions: coverage: yarn installを追加する<commit_after>name: Test and coverage measurement

on:
  push:
    paths-ignore:
      - doc/**
      - README.md
  pull_request: {}

jobs:
  test:
    name: "Ruby 3.0: test and coverage measurement"
    strategy:
      fail-fast: false
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
    env:
      RAILS_ENV: test
      TZ: Asia/Tokyo
    services:
      db:
        image: groonga/mroonga:mysql5732_mroonga1010
        ports:
          - 33060:3306
      redis:
        image: redis:6
        ports:
          - 6379:6379
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0

          # runs 'bundle install' and caches installed gems automatically
          bundler-cache: true
      # 参考: https://igarashikuniaki.net/diary/20200210.html
      - name: Install JavaScript packages
        run: |
          yarn install
      - name: Setup database
        run: |
          cp config/database.yml.github_actions config/database.yml
          bin/rails db:create
          bin/rails db:migrate
      - uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: 74e589ede57e23f089cbbd2eee75be23a93b5ace7b5cfce58213cd3f21447147
        with:
          coverageCommand: bin/rails test
{'fraction_non_alphanumeric': 0.09433258762117823, 'fraction_numerical': 0.05592841163310962, 'mean_word_length': 2.0768348623853212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5084996', 'n_tokens_mistral': 1005, 'n_tokens_neox': 902, 'n_words': 184}