name: Mini Mime Tests

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    name: "Ruby ${{ matrix.ruby }} / Failure allowed: ${{ matrix.experimental }}"
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      fail-fast: false
      matrix:
        ruby: ["2.4", "2.5", "2.6", "2.7"]
        experimental: [false]
        include:
          - ruby: "ruby-head"
            experimental: true
          - ruby: "truffleruby-head"
            experimental: true
          - ruby: "jruby-head"
            experimental: true
          - ruby: "jruby-9.1.17.0"
            experimental: true
          - ruby: "jruby-9.2.13.0"
            experimental: true
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Rubocop
        run: bundle exec rubocop
        if: "!contains(matrix.ruby, 'jruby')"
      - name: Tests
        run: bundle exec rake test
