From 85a0cdec25929d5da2c87fe429437ab4973cc27c Mon Sep 17 00:00:00 2001 From: Mog Nesbitt Date: Sun, 16 Jun 2024 15:31:25 +1200 Subject: [PATCH] Run RuboCop on GitHub Actions --- .github/workflows/lint.yml | 24 ++++++++++++++++++++++++ Gemfile | 1 + 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b39d21f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: RuboCop + +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: 2.7 + bundler-cache: true + + - name: Install gems + run: | + bundle config path vendor/bundle + bundle install + + - name: Run RuboCop + run: bundle exec rubocop --parallel diff --git a/Gemfile b/Gemfile index 2a50dc8..55bd93d 100644 --- a/Gemfile +++ b/Gemfile @@ -12,3 +12,4 @@ gemspec gem 'rake', '~> 13.0' gem 'rspec', '~> 3.0' +gem 'rubocop', '~> 1.64'