2019-08-20 08:52:53 -04:00
|
|
|
name: RuboCop
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Set up Ruby 2.6
|
|
|
|
uses: actions/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.6.x
|
|
|
|
- name: Install required package
|
|
|
|
run: |
|
|
|
|
sudo apt-get install libmysqlclient-dev libpq-dev libsqlite3-dev libncurses5-dev
|
2019-10-31 03:03:40 -04:00
|
|
|
- name: Cache gems
|
|
|
|
uses: actions/cache@preview
|
|
|
|
with:
|
|
|
|
path: vendor/bundle
|
|
|
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gem-
|
2019-08-20 08:52:53 -04:00
|
|
|
- name: Build and run RuboCop
|
|
|
|
run: |
|
2019-10-31 03:03:40 -04:00
|
|
|
bundle config path vendor/bundle
|
2019-08-20 08:52:53 -04:00
|
|
|
bundle install --jobs 4 --retry 3
|
|
|
|
bundle exec rubocop --parallel
|