name: test on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: ruby: ['2.5', '2.6', '2.7'] services: redis: image: redis ports: - 6379:6379 steps: - uses: actions/checkout@v1 - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - uses: actions/cache@v1 id: cache with: path: vendor/bundler key: ${{ hashFiles('Gemfile.lock') }}-${{ matrix.ruby }} - run: | gem install bundler bundle install --path=vendor/bundler bundle exec rspec bundle exec rubocop