[ELITERT-1198] Add action to run Ruby linters #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs Rubocop and Reek on the Pull Requests to make sure | |
# no linter warnings slip by. | |
name: Ruby Linters | |
on: | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: ['2.7'] | |
env: | |
BUNDLE_GEMFILE: Gemfile.lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Run Rubocop | |
uses: reviewdog/[email protected] | |
with: | |
skip_install: true | |
rubocop_version: gemfile | |
rubocop_extensions: rubocop-rspec:gemfile | |
use_bundler: true | |
# TODO: Add the Reek step (reviewdog/action-reek) after updating the gem to Ruby 3.0+ (ELITERT-1204) |