Skip to content

danielwestendorf/bundled-rubocop-codestyle-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bundled Rubocop Codestyle Action

Lint your Ruby code in parallel to your builds with annotations. Runs as a composite action using your installed and configured ruby runtime.

Setup

# .github/workflows/ruby_codestyle.yml

name: Ruby Codestyle

on: [pull_request]

jobs:

  lint:

    runs-on: ubuntu-latest

    steps:
    ### START SUGGESTED SETUP
    - uses: actions/checkout@v2

    - uses: actions/cache@v2
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-

    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.6 # MATCH YOUR RUBY VERSION?

    - name: Bundle install
      run: |
        bundle config path vendor/bundle
        bundle install --jobs 4 --retry 3

    ### END SUGGESTED SETUP

    - name: Rubocop checks
      uses: danielwestendorf/bundled-rubocop-codestyle-action@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For annotations

Credit: gimenete/rubocop-action

About

Run rubocop codestyle checks with bundled version of rubocop

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages