name: Main on: push: branches: - master pull_request: branches: - master jobs: ci: runs-on: ubuntu-latest strategy: fail-fast: true steps: - uses: actions/checkout@v1 - name: Use Ruby 2.6 uses: actions/setup-ruby@v1 with: ruby-version: '2.6' - uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- - name: Install gems run: | gem install bundler bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Run rubocop run: bundle exec rubocop - name: Run tests run: bundle exec rspec