name: Test on: push: branches: [ main ] pull_request: branches: [ main ] jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 bundler-cache: true - name: Run linters run: | bundle install && bundle exec rubocop test: runs-on: ubuntu-latest strategy: matrix: ruby-version: [2.6, 2.7, 3.0] steps: - name: Checkout code uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: test run: | bundle install && bundle exec rspec