name: Tests

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    name: >-
      ${{ matrix.os }} ${{ matrix.ruby }}

    runs-on: ${{ matrix.os }}
    if: |
      !(   contains(github.event.pull_request.title,  '[ci skip]')
        || contains(github.event.pull_request.title,  '[skip ci]')
        || contains(github.event.head_commit.message, '[ci skip]')
        || contains(github.event.head_commit.message, '[skip ci]'))
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-16.04
          - ubuntu-18.04
          - ubuntu-20.04
        ruby:
          - 2.3
          - 2.4
          - 2.5
          - 2.6
          - 2.7
          # YAML gotcha: https://github.com/actions/runner/issues/849
          - '3.0'
          - head
    env:
      influx_version: nightly
      channel: nightlies
    steps:
      - uses: actions/checkout@v2

      - run: bin/provision.sh

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

      - name: Run specs
        continue-on-error: ${{ matrix.allow-failure || false }}
        run: bundle exec rake

name: Tests

on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    name: >-
      ${{ matrix.os }} ${{ matrix.ruby }}

    runs-on: ${{ matrix.os }}
    if: |
      !(   contains(github.event.pull_request.title,  '[ci skip]')
        || contains(github.event.pull_request.title,  '[skip ci]')
        || contains(github.event.head_commit.message, '[ci skip]')
        || contains(github.event.head_commit.message, '[skip ci]'))
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-16.04
          - ubuntu-18.04
          - ubuntu-20.04
        ruby:
          - 2.3
          - 2.4
          - 2.5
          - 2.6
          - 2.7
          # YAML gotcha: https://github.com/actions/runner/issues/849
          - '3.0'
          - head
        include:
          - { os: ubuntu-20.04, ruby: jruby-9.1 }
          - { os: ubuntu-20.04, ruby: jruby-9.2 }
          - { os: ubuntu-20.04, ruby: jruby-head, allow-failure: true }

    env:
      influx_version: nightly
      channel: nightlies
    steps:
      - uses: actions/checkout@v2

      - run: bin/provision.sh

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

      - name: Run specs
        continue-on-error: ${{ matrix.allow-failure || false }}
        run: bundle exec rake

Add JRuby to test matrix
Add JRuby to test matrix
