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.3', '3.2', '3.1'] gemfile: ['rails61', 'rails7', 'rails71'] 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@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Run tests run: bundle exec rspec