name: Linter

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    env:
      BUNDLE_WITHOUT: benchmark
    steps:
    - name: Checkout rubyzip code
      uses: actions/checkout@v4

    - name: Install and set up ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: '3.0'
        bundler-cache: true

    - name: Rubocop
      run: bundle exec rubocop
