name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: ["2.4"]

    env:
      RAILS_ENV: test

    services:
      postgres:
        image: postgres
        ports:
          - 5432:5432
        env:
          POSTGRES_DB: acts_as_joinable_test
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true

      # - name: Setup tmate debugging session
      #   uses: mxschmitt/action-tmate@v3

      - name: Run tests
        run: |
          cp test/dummy/config/database.ci.yml test/dummy/config/database.yml
          bundle exec rake test

name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: ["2.6"]

    env:
      RAILS_ENV: test

    services:
      postgres:
        image: postgres
        ports:
          - 5432:5432
        env:
          POSTGRES_DB: acts_as_joinable_test
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true

      # - name: Setup tmate debugging session
      #   uses: mxschmitt/action-tmate@v3

      - name: Run tests
        run: |
          cp test/dummy/config/database.ci.yml test/dummy/config/database.yml
          bundle exec rake test

Switch to Ruby 2.6 on CI
Switch to Ruby 2.6 on CI
