name: Test

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

jobs:
  test:
    name: Test Log Archiver
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - 2.5
          - 2.6
          - 2.7
    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: ${{ matrix.ruby }}

          # 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
      - name: Run tests
        run: bin/rails test

name: Test

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

jobs:
  test:
    name: Test Log Archiver
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - 2.5
          - 2.6
          - 2.7
    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:latest
        ports:
          - 33060:3306
      redis:
        image: redis:6
        ports:
          - 6379:6379
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}

          # 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
      - name: Run tests
        run: bin/rails test

Revert "GitHub Actions: Mroonga 10.10を使う"
Revert "GitHub Actions: Mroonga 10.10を使う"

This reverts commit 0457b9954e0e7b70a67581df7a66d3abe86baf8c.

コミット c2b7f0d2ef1b3a2b4af48d1748366625c61169f0 において
db/migrate/20170617130524に外部キー制約の削除・復元を追加したことで、
Mroonga 10.11でもエラーが発生しなくなったので、この暫定措置が不要に
なった。
