--- name: CI on: - push - pull_request jobs: rspec: runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: ruby: - '3.0' - '2.7' - '2.6' - '2.5' rails: - rails_5.2.4 - rails_6.0.3 - rails_6.1.0 exclude: - ruby: '3.0' rails: rails_5.2.4 steps: - name: Checkout uses: actions/checkout@v2 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Setup Ruby cache uses: actions/cache@v2 with: path: "${GITHUB_WORKSPACE}/vendor/bundle" key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}- - name: Bundle env: RAILS_VERSION: ${{ matrix.rails }} run: | export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${RAILS_VERSION}.gemfile" gem install bundler bundle config path "${GITHUB_WORKSPACE}/vendor/bundle" bundle install --jobs 4 --retry 3 - name: RSpec env: RAILS_VERSION: ${{ matrix.rails }} run: | export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${RAILS_VERSION}.gemfile" bundle exec rake