rubocop を GitHub Actions で動かす

Gemfile

group :development, :test do
  gem 'rubocop', require: false
  gem 'rubocop-performance', require: false
  gem 'rubocop-rails', require: false
  gem 'rubocop-rspec', require: false
end

.rubocop.yml

require:
  - rubocop-performance
  - rubocop-rails
  - rubocop-rspec

.github/workflows/pronto.yml (ファイル名は任意)

name: Pronto
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  pronto:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: HeRoMo/pronto-[email protected]
        with:
          commit: origin/develop # master ならこの行は不要
          github_token: ${{ secrets.GITHUB_TOKEN }}