Skip to content

Commit

Permalink
feat: Add github action for linting rubocop [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
KapilSachdev committed Nov 11, 2020
1 parent a06f0ae commit 91f57a3
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/rubocop.yml
@@ -0,0 +1,38 @@
name: Rubocop

on: [push, pull_request]

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2

- name: Set up bundle cache
uses: actions/cache@v2
with:
path: /vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('./Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Ruby dependencies
run: |
bundle config path /vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run linters
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
rubocop: true
rubocop_command_prefix: bundle exec
rubocop_args: -c ./.rubocop.yml

0 comments on commit 91f57a3

Please sign in to comment.