name: Ruby CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: test: name: "Ruby ${{ matrix.ruby }}, Gemfile ${{ matrix.gemfile }}" runs-on: ubuntu-latest strategy: fail-fast: true matrix: ruby: ['3.1', '3.0', '2.7'] gemfile: ['rails52', 'rails6', 'rails61', 'rails7'] env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - uses: actions/checkout@v2 - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Run tests run: bundle exec rspec