Shopify/active_merchant

View on GitHub
.github/workflows/ruby-ci.yml

Summary

Maintainability
Test Coverage
name: CI

on:
  pull_request:
    branches:
      - '**'
  push:
    branches:
      - master

jobs:
  build:
    name: Ruby ${{ matrix.version }} ${{ matrix.gemfile }}
    runs-on: ubuntu-latest
    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}
    strategy:
      matrix:
        version:
          - 3.1
        gemfile:
          - gemfiles/Gemfile.rails50
          - gemfiles/Gemfile.rails51
          - gemfiles/Gemfile.rails52
          - gemfiles/Gemfile.rails60
          - gemfiles/Gemfile.rails_master
        exclude:
          - version: 2.6
            gemfile: gemfiles/Gemfile.rails_master
          - version: 2.5
            gemfile: gemfiles/Gemfile.rails_master
    steps:
      - uses: actions/checkout@v2
      
      - name: Set up Ruby ${{ matrix.version }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.version }}
          bundler-cache: true

      - name: Test
        run: bundle exec rake test
      - name: Linter
        run: bundle exec rubocop