Skip to content

Instantly share code, notes, and snippets.

@tonyvince
Last active September 4, 2020 14:25
Show Gist options
  • Save tonyvince/ec870bef8704a9677ef9aa7a5e2de5ec to your computer and use it in GitHub Desktop.
Save tonyvince/ec870bef8704a9677ef9aa7a5e2de5ec to your computer and use it in GitHub Desktop.
# .github/workflows/rubocop.yml
name: RuboCop
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Ruby 2.5
uses: actions/setup-ruby@v1
with:
ruby-version: 2.5.x # Replace with your ruby version
- name: Gems Cache
id: gem-cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Rubocop Linter Action
uses: andrewmcodes/rubocop-linter-action@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment