2020-11-16 20:11:33 +00:00
|
|
|
name: RuboCop
|
2020-11-11 20:00:46 +00:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2020-11-16 20:11:33 +00:00
|
|
|
build:
|
2020-11-11 20:00:46 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-11-16 20:11:33 +00:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v2
|
2020-11-11 20:00:46 +00:00
|
|
|
|
2020-11-16 20:11:33 +00:00
|
|
|
- name: Setup Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
2020-11-11 20:00:46 +00:00
|
|
|
|
2020-11-16 20:11:33 +00:00
|
|
|
- name: Cache gems
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ../vendor/bundle
|
|
|
|
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-rubocop-
|
2020-11-11 20:00:46 +00:00
|
|
|
|
2020-11-16 20:11:33 +00:00
|
|
|
- name: Install gems
|
|
|
|
run: |
|
|
|
|
bundle config path ../vendor/bundle
|
|
|
|
bundle install --jobs 4 --retry 3
|
2020-11-11 20:00:46 +00:00
|
|
|
|
2020-11-16 20:11:33 +00:00
|
|
|
- name: Run RuboCop
|
|
|
|
run: bundle exec rubocop --parallel
|