2019-08-20 08:52:53 -04:00
|
|
|
name: RuboCop
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2019-12-21 23:47:02 -05:00
|
|
|
- uses: actions/checkout@v2
|
2020-02-06 20:59:01 -05:00
|
|
|
- name: Set up Ruby 2.7
|
|
|
|
uses: ruby/setup-ruby@v1
|
2019-08-20 08:52:53 -04:00
|
|
|
with:
|
2020-02-06 20:59:01 -05:00
|
|
|
ruby-version: 2.7
|
2020-03-27 19:55:26 -04:00
|
|
|
- name: Cache gems
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: vendor/bundle
|
|
|
|
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-rubocop-
|
|
|
|
- name: Install gems
|
2019-08-20 08:52:53 -04:00
|
|
|
run: |
|
2020-03-27 19:55:26 -04:00
|
|
|
bundle config path vendor/bundle
|
|
|
|
bundle config set without 'default doc job cable storage ujs test db'
|
|
|
|
bundle install --jobs 4 --retry 3
|
2019-11-26 00:28:06 -05:00
|
|
|
- name: Run RuboCop
|
2020-03-27 19:55:26 -04:00
|
|
|
run: bundle exec rubocop --parallel
|