# based on https://github.com/rails/rails/blob/4a78dcb/.github/workflows/rubocop.yml

name: rubocop linting

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3.2
        bundler-cache: true
    - name: Install and run ragel
      run: |
        sudo apt-get install -yqq ragel
        bundle exec rake ragel
    - name: Run rubocop
      run: bundle exec rubocop
